summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-04-04 17:06:20 (GMT)
committerFred Sundvik <fsundvik@gmail.com>2016-04-04 17:18:35 (GMT)
commitfd808ae3c1e37a8d476d250cf6b4325624a9eccb (patch)
tree06988d5b854514aff282e21543573eb363fc81f4 /src
parent3731948d0b66ab53251201687ba7c682c2872e4d (diff)
downloadDoxygen-fd808ae3c1e37a8d476d250cf6b4325624a9eccb.zip
Doxygen-fd808ae3c1e37a8d476d250cf6b4325624a9eccb.tar.gz
Doxygen-fd808ae3c1e37a8d476d250cf6b4325624a9eccb.tar.bz2
Fix STRIP_FROM_PATH when running from drive root
When running doxygen from the drive root, the STRIP_FROM_PATH, variable could get an extra slash. As a result no paths were stripped. This fix makes sure that a duplicate slash is not added both for the automatic generation, and when you specify a relative path that maps to the drive root in the configuration. Also change some tabs to spaces
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
{