diff options
author | Marc Laukien <marc@zeroc.com> | 2004-12-04 00:17:43 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2004-12-04 00:17:43 +0000 |
commit | 9e78b114f037b641f6baeb2931e6030b6c86a5a9 (patch) | |
tree | fc8947f87bb1df44244451412262314296638945 /cpp/src/IcePatch2/ClientUtil.cpp | |
parent | fix (diff) | |
download | ice-9e78b114f037b641f6baeb2931e6030b6c86a5a9.tar.bz2 ice-9e78b114f037b641f6baeb2931e6030b6c86a5a9.tar.xz ice-9e78b114f037b641f6baeb2931e6030b6c86a5a9.zip |
fixes
Diffstat (limited to 'cpp/src/IcePatch2/ClientUtil.cpp')
-rwxr-xr-x | cpp/src/IcePatch2/ClientUtil.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/cpp/src/IcePatch2/ClientUtil.cpp b/cpp/src/IcePatch2/ClientUtil.cpp index 4c741fa3b3b..9670736406a 100755 --- a/cpp/src/IcePatch2/ClientUtil.cpp +++ b/cpp/src/IcePatch2/ClientUtil.cpp @@ -156,18 +156,21 @@ IcePatch2::Patcher::Patcher(const CommunicatorPtr& communicator, const PatcherFe const_cast<Int&>(_chunkSize) = 1; } + if(_dataDir[0] != '/') + { #ifdef _WIN32 - char cwd[_MAX_PATH]; - if(_getcwd(cwd, _MAX_PATH) == NULL) + char cwd[_MAX_PATH]; + if(_getcwd(cwd, _MAX_PATH) == NULL) #else - char cwd[PATH_MAX]; - if(getcwd(cwd, PATH_MAX) == NULL) + char cwd[PATH_MAX]; + if(getcwd(cwd, PATH_MAX) == NULL) #endif - { - throw "cannot get the current directory:\n" + lastError(); - } + { + throw "cannot get the current directory:\n" + lastError(); + } - const_cast<string&>(_dataDir) = normalize(string(cwd) + '/' + _dataDir); + const_cast<string&>(_dataDir) = string(cwd) + '/' + _dataDir; + } PropertiesPtr properties = communicator->getProperties(); |