diff options
author | Carl Olsson <carl.olsson@gmail.com> | 2015-03-23 08:19:20 +1000 |
---|---|---|
committer | Carl Olsson <carl.olsson@gmail.com> | 2015-03-23 08:19:20 +1000 |
commit | fb2cdfe7edcc2ccafea7604afd104f582e5b9c17 (patch) | |
tree | d9555d9519648f95d7ed3663fbca50978bb12a1f /drivers/windows/dir_access_windows.cpp | |
parent | 41686d5fdd0d72f167894f976d19b177789f1f63 (diff) | |
parent | e9f94ce8d2cc6805e74fffdf733e6dc5b5c530f5 (diff) |
Merge branch 'master' of https://github.com/not-surt/godot into snapping2
Conflicts:
tools/editor/plugins/canvas_item_editor_plugin.cpp
tools/editor/plugins/canvas_item_editor_plugin.h
Diffstat (limited to 'drivers/windows/dir_access_windows.cpp')
-rw-r--r-- | drivers/windows/dir_access_windows.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index d1e9766105..4c265a1ab2 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -68,6 +68,7 @@ struct DirAccessWindowsPrivate { bool DirAccessWindows::list_dir_begin() { _cisdir=false; + _cishidden=false; if (unicode) { list_dir_end(); @@ -95,6 +96,8 @@ String DirAccessWindows::get_next() { if (unicode) { _cisdir=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); + _cishidden=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN); + String name=p->fu.cFileName; if (FindNextFileW(p->h, &p->fu) == 0) { @@ -108,6 +111,7 @@ String DirAccessWindows::get_next() { #ifndef WINRT_ENABLED _cisdir=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); + _cishidden=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN); String name=p->f.cFileName; @@ -128,6 +132,11 @@ bool DirAccessWindows::current_is_dir() const { return _cisdir; } +bool DirAccessWindows::current_is_hidden() const { + + return _cishidden; +} + void DirAccessWindows::list_dir_end() { if (p->h!=INVALID_HANDLE_VALUE) { @@ -270,7 +279,7 @@ Error DirAccessWindows::make_dir(String p_dir) { return OK; }; - if (err == ERROR_ALREADY_EXISTS) { + if (err == ERROR_ALREADY_EXISTS || err == ERROR_ACCESS_DENIED) { return ERR_ALREADY_EXISTS; }; |