Merge pull request #1823 from nextcloud/filepicker-folder-fix

Fix picking a folder with the filepicker
This commit is contained in:
Roeland Jago Douma 2016-10-25 08:22:59 +02:00 committed by GitHub
commit 1ff328ae65
1 changed files with 4 additions and 1 deletions

View File

@ -194,7 +194,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');