Make ".." always appear even if dir is unlistable (likely lacking permissions), closes #1938

(cherry picked from commit adc13e9027)
This commit is contained in:
Juan Linietsky 2016-06-18 12:49:58 -03:00 committed by Rémi Verschelde
parent 18cb1f8e44
commit beb2176399
2 changed files with 10 additions and 0 deletions

View File

@ -341,6 +341,11 @@ void FileDialog::update_file_list() {
}
}
if (dirs.find("..")==NULL) {
//may happen if lacking permissions
dirs.push_back("..");
}
dirs.sort_custom<NoCaseComparator>();
files.sort_custom<NoCaseComparator>();

View File

@ -509,6 +509,11 @@ void EditorFileDialog::update_file_list() {
}
}
if (dirs.find("..")==NULL) {
//may happen if lacking permissions
dirs.push_back("..");
}
dirs.sort_custom<NoCaseComparator>();
files.sort_custom<NoCaseComparator>();