From adc13e902722d62555d112a74c5b8ce39348aceb Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 18 Jun 2016 12:49:58 -0300 Subject: Make ".." always appear even if dir is unlistable (likely lacking permissions), closes #1938 --- scene/gui/file_dialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scene/gui') 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(); files.sort_custom(); -- cgit v1.2.3