summaryrefslogtreecommitdiff
path: root/drivers/windows/dir_access_windows.cpp
diff options
context:
space:
mode:
authorAnton Yabchinskiy <arn@bestmx.ru>2015-04-04 09:31:21 +0300
committerAnton Yabchinskiy <arn@bestmx.ru>2015-04-04 09:31:21 +0300
commit16746f157f83d666079ba3266acec13d35b84c3f (patch)
tree8c872d18ccdef90a15e72622cd0139e0e64801a6 /drivers/windows/dir_access_windows.cpp
parent43713810deaadfec6a1656767cf5520073e58a06 (diff)
parent5d99e15e43d5a446b35d48e8a3b08a478f1998a9 (diff)
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'drivers/windows/dir_access_windows.cpp')
-rw-r--r--drivers/windows/dir_access_windows.cpp11
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;
};