diff options
author | Jonas Suhr Christensen <jsc@umbraculum.org> | 2013-05-04 20:37:47 +0200 |
---|---|---|
committer | Jonas Suhr Christensen <jsc@umbraculum.org> | 2013-05-04 20:37:47 +0200 |
commit | 52607a944acc7039ce186f07c8894912c8a9b898 (patch) | |
tree | f26a07a2fb53838a91e822053c0b42819e1f18fd /plugingui/directory.cc | |
parent | e5fe82bc8f37bb3bbd2de04e6b9170211372cf4c (diff) |
tolower in isRoot().
Diffstat (limited to 'plugingui/directory.cc')
-rw-r--r-- | plugingui/directory.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugingui/directory.cc b/plugingui/directory.cc index b9188b8..17190e7 100644 --- a/plugingui/directory.cc +++ b/plugingui/directory.cc @@ -125,8 +125,10 @@ Directory::EntryList Directory::listFiles(std::string path) { std::string name = entry->d_name; if(name == ".") continue; +#ifndef WIN32 if(Directory::isRoot(path) && name == "..") continue; - +#endif + entries.push_back(entry->d_name); } @@ -134,7 +136,8 @@ Directory::EntryList Directory::listFiles(std::string path) { } bool Directory::isRoot(std::string path) { -#ifdef WIN32 +#ifdef WIN32 + std::transform(data.begin(), data.end(), data.begin(), ::tolower); // TODO: This is not a correct root calculation, but works with partitions if(path.size() == 2) { if(path == root()) return true; |