summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/ClientUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePatch2/ClientUtil.cpp')
-rwxr-xr-xcpp/src/IcePatch2/ClientUtil.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/IcePatch2/ClientUtil.cpp b/cpp/src/IcePatch2/ClientUtil.cpp
index acc1ebb1962..99e2452b2f0 100755
--- a/cpp/src/IcePatch2/ClientUtil.cpp
+++ b/cpp/src/IcePatch2/ClientUtil.cpp
@@ -162,19 +162,25 @@ IcePatch2::Patcher::Patcher(const CommunicatorPtr& communicator, const PatcherFe
{
char cwd[_MAX_PATH];
if(_getcwd(cwd, _MAX_PATH) == NULL)
+ {
+ throw "cannot get the current directory:\n" + lastError();
+ }
+
+ const_cast<string&>(_dataDir) = string(cwd) + '/' + _dataDir;
+ }
#else
if(_dataDir[0] != '/')
{
char cwd[PATH_MAX];
if(getcwd(cwd, PATH_MAX) == NULL)
-#endif
{
throw "cannot get the current directory:\n" + lastError();
}
const_cast<string&>(_dataDir) = string(cwd) + '/' + _dataDir;
}
-
+#endif
+
PropertiesPtr properties = communicator->getProperties();
const char* endpointsProperty = "IcePatch2.Endpoints";