summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePatch2/Server.cpp')
-rw-r--r--cpp/src/IcePatch2/Server.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp
index 8590dcca685..c6a621b0351 100644
--- a/cpp/src/IcePatch2/Server.cpp
+++ b/cpp/src/IcePatch2/Server.cpp
@@ -112,12 +112,7 @@ IcePatch2::PatcherService::start(int argc, char* argv[])
}
dataDir = normalize(string(cwd) + '/' + dataDir);
-
- if(chdir(dataDir.c_str()) == -1)
- {
- throw "cannot change directory to `" + dataDir + "': " + strerror(errno);
- }
-
+
loadFileInfoSeq(dataDir, infoSeq);
}
catch(const string& ex)
@@ -148,7 +143,7 @@ IcePatch2::PatcherService::start(int argc, char* argv[])
const char* idProperty = "IcePatch2.Identity";
Identity id = stringToIdentity(properties->getPropertyWithDefault(idProperty, "IcePatch2/server"));
- adapter->add(new FileServerI(infoSeq), id);
+ adapter->add(new FileServerI(dataDir, infoSeq), id);
if(adminAdapter)
{