Fix picking a folder with the filepicker

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2016-10-20 15:42:57 +02:00
parent ed4ed7911a
commit fb9e500698
No known key found for this signature in database
GPG Key ID: 425003AC385454C5
1 changed files with 4 additions and 1 deletions

View File

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