From 52607a944acc7039ce186f07c8894912c8a9b898 Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Sat, 4 May 2013 20:37:47 +0200 Subject: tolower in isRoot(). --- plugingui/directory.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugingui') 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; -- cgit v1.2.3