diff options
-rw-r--r-- | core/js/oc-dialogs.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 7a7876bf30f..bbec814aa3a 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -193,7 +193,10 @@ var OCdialogs = { }); } else { datapath = self.$filePicker.data('path'); - datapath += '/' + self.$filelist.find('tr.filepicker_element_selected').data('entryname'); + var selectedName = self.$filelist.find('tr.filepicker_element_selected').data('entryname'); + if (selectedName) { + datapath += '/' + selectedName; + } } callback(datapath); self.$filePicker.ocdialog('close'); |