diff options
Diffstat (limited to 'src/configimpl.l')
-rw-r--r-- | src/configimpl.l | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/configimpl.l b/src/configimpl.l index f1d33c0..ac046a8 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -1155,24 +1155,27 @@ static void cleanUpPaths(QStrList &str) char c; while ((c=*p)) { - if (c=='\\') *p='/'; - p++; + if (c=='\\') *p='/'; + p++; } } QCString path = sfp; if ((path.at(0)!='/' && (path.length()<=2 || path.at(1)!=':')) || - path.at(path.length()-1)!='/' + path.at(path.length()-1)!='/' ) { QFileInfo fi(path); if (fi.exists() && fi.isDir()) { - int i = str.at(); - str.remove(); - if (str.at()==i) // did not remove last item - str.insert(i,fi.absFilePath().utf8()+"/"); - else - str.append(fi.absFilePath().utf8()+"/"); + int i = str.at(); + QString p = fi.absFilePath(); + if (p.at(p.length()-1)!='/') + p.append('/'); + str.remove(); + if (str.at()==i) // did not remove last item + str.insert(i,p.utf8()); + else + str.append(p.utf8()); } } sfp = str.next(); @@ -1281,7 +1284,10 @@ void Config::checkAndCorrect() char *sfp = stripFromPath.first(); if (sfp==0) // by default use the current path { - stripFromPath.append(QDir::currentDirPath().utf8()+"/"); + QString p = QDir::currentDirPath(); + if (p.at(p.length()-1)!='/') + p.append('/'); + stripFromPath.append(p.utf8()); } else { |