summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Calc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePatch2/Calc.cpp')
-rw-r--r--cpp/src/IcePatch2/Calc.cpp9
1 files changed, 7 insertions, 2 deletions
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)