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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp
index a236dde862e..df8fe85fbe0 100644
--- a/cpp/src/IcePatch2/Calc.cpp
+++ b/cpp/src/IcePatch2/Calc.cpp
@@ -88,12 +88,14 @@ main(int argc, char* argv[])
try
{
- if(dataDir[0] != '/')
- {
#ifdef _WIN32
+ if(dataDir[0] != '/' && !(dataDir.size() > 1 && isalpha(dataDir[0]) && dataDir[1] == ':'))
+ {
char cwd[_MAX_PATH];
if(_getcwd(cwd, _MAX_PATH) == NULL)
#else
+ if(dataDir[0] != '/')
+ {
char cwd[PATH_MAX];
if(getcwd(cwd, PATH_MAX) == NULL)
#endif