From ad193ea9e13b334df57472f1b14d7cd4b0545f37 Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Wed, 2 Mar 2005 02:06:05 +0000 Subject: Fixed bug in IcePatch2: / couldn't be used as the data dir. --- cpp/src/IcePatch2/Calc.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cpp/src/IcePatch2/Calc.cpp') diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp index 4e4d82d7151..0e4e7e40321 100644 --- a/cpp/src/IcePatch2/Calc.cpp +++ b/cpp/src/IcePatch2/Calc.cpp @@ -213,8 +213,13 @@ main(int argc, char* argv[]) } } - string absDataDirWithSlash = absDataDir + '/'; - + // + // We must call simplify() here: under Cygwin, any path starting with + // a double slash simply doesn't work. But, if dataDir is "/", we end + // up with paths that start with "//" unless we call simplify(). + // + string absDataDirWithSlash = simplify(absDataDir + '/'); + for(p = fileSeq.begin(); p != fileSeq.end(); ++p) { if(p->compare(0, absDataDirWithSlash.size(), absDataDirWithSlash) != 0) -- cgit v1.2.3