From e646fc5b5d55869a7d497e69f1e513c226e6e75d Mon Sep 17 00:00:00 2001 From: Roman Nekrassow Date: Sat, 14 Mar 2015 12:35:18 +0100 Subject: [Fix] make_dir_recursive on Windows function normally tries to create c: which isn't possible, because the access is denied, handling ERROR_ACCESS_DENIED as ERR_ALREADY_EXISTS lets the function skip the creation of c: . --- drivers/windows/dir_access_windows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/windows/dir_access_windows.cpp') diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index d1e9766105..aa96faac1b 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -270,7 +270,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; }; -- cgit v1.2.3 From db0a71fc58137da99137e9fbea3ee982679c9afd Mon Sep 17 00:00:00 2001 From: rollenrolm Date: Sat, 21 Mar 2015 18:33:32 +0100 Subject: New option to show/hide hidden files --- drivers/windows/dir_access_windows.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/windows/dir_access_windows.cpp') diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index d1e9766105..64df801b12 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) { -- cgit v1.2.3