1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Hides special folders in FileDialog for macOS

(cherry picked from commit 1998f78679)
This commit is contained in:
Haoyu Qiu
2020-09-28 14:06:36 +08:00
committed by Rémi Verschelde
parent 0d8cbd5d8c
commit 7840a550b5
4 changed files with 18 additions and 1 deletions

View File

@@ -154,7 +154,7 @@ String DirAccessUnix::get_next() {
_cisdir = (entry->d_type == DT_DIR);
}
_cishidden = (fname != "." && fname != ".." && fname.begins_with("."));
_cishidden = is_hidden(fname);
return fname;
}
@@ -408,6 +408,10 @@ String DirAccessUnix::get_filesystem_type() const {
return ""; //TODO this should be implemented
}
bool DirAccessUnix::is_hidden(const String &p_name) {
return p_name != "." && p_name != ".." && p_name.begins_with(".");
}
DirAccessUnix::DirAccessUnix() {
dir_stream = 0;