From 4e242569899155fe414950ef0eaf4bbf19e14e3d Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Sat, 4 May 2013 20:40:01 +0200 Subject: to lower case partition name --- plugingui/directory.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugingui/directory.cc b/plugingui/directory.cc index 17190e7..9a8fb38 100644 --- a/plugingui/directory.cc +++ b/plugingui/directory.cc @@ -28,6 +28,8 @@ #include #include +#include +#include #ifdef WIN32 #include @@ -137,7 +139,7 @@ Directory::EntryList Directory::listFiles(std::string path) { bool Directory::isRoot(std::string path) { #ifdef WIN32 - std::transform(data.begin(), data.end(), data.begin(), ::tolower); + std::transform(path.begin(), path.end(), path.begin(), ::tolower); // TODO: This is not a correct root calculation, but works with partitions if(path.size() == 2) { if(path == root()) return true; @@ -181,8 +183,8 @@ Directory::DriveList Directory::drives() { for(int i = 0; i < 32; i++) { if(d & (1 << i)) { drive_t drive; - char name[] = "X:"; - name[0] = i + 'A'; + char name[] = "x:"; + name[0] = i + 'a'; drive.name = name; drive.number = i; -- cgit v1.2.3