summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-18 12:49:58 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-18 12:51:27 -0300
commitadc13e902722d62555d112a74c5b8ce39348aceb (patch)
tree1a778e651d28c01bf8359302adcfbdd0a37854ab /scene
parente048d1e0a2acc187c90f1df5da807e01547b6e74 (diff)
Make ".." always appear even if dir is unlistable (likely lacking permissions), closes #1938
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/file_dialog.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 732cbb8e72..d335399caa 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -339,6 +339,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>();