comparison common.cpp @ 85:7ed57064f293

* Remove trailing / from dir name (otherwise QFileInfo returns wrong parent path)
author Chris Cannam
date Mon, 22 Nov 2010 17:42:06 +0000
parents 8a4e26dc3182
children 1928f9b408e6
comparison
equal deleted inserted replaced
84:8a4e26dc3182 85:7ed57064f293
182 #endif 182 #endif
183 } 183 }
184 184
185 FolderStatus getFolderStatus(QString path) 185 FolderStatus getFolderStatus(QString path)
186 { 186 {
187 if (path != "/" && path.endsWith("/")) {
188 path = path.left(path.length()-1);
189 }
187 DEBUG << "getFolderStatus: " << path << endl; 190 DEBUG << "getFolderStatus: " << path << endl;
188 QFileInfo fi(path); 191 QFileInfo fi(path);
189 if (fi.exists()) { 192 if (fi.exists()) {
190 DEBUG << "exists" << endl; 193 DEBUG << "exists" << endl;
191 QDir dir(path); 194 QDir dir(path);