summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2016-04-09 17:06:37 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2016-04-09 17:06:37 (GMT)
commit930fb8935329fab0748502bb0a692326c0e0038b (patch)
treeadaea2571e44c3f42c1f04a42d0ae46c86cc21aa /src
parent85eb0e59602b2f176e0f0923e5a2d5562a49cddc (diff)
parentfd808ae3c1e37a8d476d250cf6b4325624a9eccb (diff)
downloadDoxygen-930fb8935329fab0748502bb0a692326c0e0038b.zip
Doxygen-930fb8935329fab0748502bb0a692326c0e0038b.tar.gz
Doxygen-930fb8935329fab0748502bb0a692326c0e0038b.tar.bz2
Merge pull request #465 from fredizzimo/fix_strip_from_path
Fix STRIP_FROM_PATH when running from drive root
Diffstat (limited to 'src')
-rw-r--r--src/configimpl.l26
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
{