Only add slash if basePath is a directory.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=879394
This commit is contained in:
Petri Damstén 2008-11-03 08:06:49 +00:00
parent e603f32c33
commit 78b0fc5ce5

View File

@ -52,7 +52,8 @@ public:
basePath(p), basePath(p),
valid(QFile::exists(basePath)) valid(QFile::exists(basePath))
{ {
if (valid && basePath[basePath.length() - 1] != '/') { QFileInfo info(basePath);
if (valid && info.isDir() && basePath[basePath.length() - 1] != '/') {
basePath.append('/'); basePath.append('/');
} }
} }