summaryrefslogtreecommitdiff
path: root/plugingui/directory.cc
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-09-23 18:05:01 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-09-23 18:05:01 +0200
commit89b7b3c16e0aabb5470bb6b8191eac9fbbeb9e49 (patch)
tree811ddc95247e22e679f67b95d559c878e4d51bbe /plugingui/directory.cc
parent5dde7cb0f1e980695f24e4111eb811112b0407ca (diff)
Testing config file creation on windows XP.
Diffstat (limited to 'plugingui/directory.cc')
-rw-r--r--plugingui/directory.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugingui/directory.cc b/plugingui/directory.cc
index 61b1441..141d944 100644
--- a/plugingui/directory.cc
+++ b/plugingui/directory.cc
@@ -320,11 +320,14 @@ bool Directory::isHidden(std::string path)
{
// TODO: Handle hidden and system files in windows
#ifdef WIN32
- return false;
+ DWORD fattribs = GetFileAttributes(path.c_str());
+ if(fattribs & FILE_ATTRIBUTE_HIDDEN) {
+ return false;
+ }
+ return true;
#else
unsigned pos = path.find_last_of("/\\");
std::string entry = path.substr(pos+1);
-
if(entry.size() > 1 &&
entry.at(0) == '.' &&
entry.at(1) != '.') {