summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Client.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2005-01-27 21:22:48 +0000
committerMarc Laukien <marc@zeroc.com>2005-01-27 21:22:48 +0000
commit1decea8e7dcbf1c7836d27401d63229c49191556 (patch)
treed4bd9e931ea34841bc194b711f77f9cec4a499b3 /cpp/src/IcePatch2/Client.cpp
parentbug fix for thread per connection (diff)
downloadice-1decea8e7dcbf1c7836d27401d63229c49191556.tar.bz2
ice-1decea8e7dcbf1c7836d27401d63229c49191556.tar.xz
ice-1decea8e7dcbf1c7836d27401d63229c49191556.zip
icepatch2 changes
Diffstat (limited to 'cpp/src/IcePatch2/Client.cpp')
-rw-r--r--cpp/src/IcePatch2/Client.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/cpp/src/IcePatch2/Client.cpp b/cpp/src/IcePatch2/Client.cpp
index ce6752b215b..8c9581061f2 100644
--- a/cpp/src/IcePatch2/Client.cpp
+++ b/cpp/src/IcePatch2/Client.cpp
@@ -14,7 +14,6 @@
#ifdef _WIN32
# include <conio.h>
-# include <direct.h>
#else
# include <fcntl.h>
# include <termios.h>
@@ -254,25 +253,11 @@ Client::run(int argc, char* argv[])
usage(argv[0]);
return EXIT_FAILURE;
}
- if(args.empty())
+ if(args.size() == 1)
{
- cerr << argv[0] << ": no data directory specified" << endl;
- usage(argv[0]);
- return EXIT_FAILURE;
- }
-
- //
- // Make working directory the data directory *before* calling normalize() for
- // for the first time (because normalize caches the current working directory).
- //
- if(chdir(args[0].c_str()) != 0)
- {
- string msg = "cannot change working directory to `" + args[0] + "': " + lastError();
- throw msg;
+ properties->setProperty("IcePatch2.Directory", args[0]);
}
- properties->setProperty("IcePatch2.Directory", normalize("."));
-
bool aborted = false;
try
@@ -284,7 +269,7 @@ Client::run(int argc, char* argv[])
if(!aborted)
{
- aborted = !patcher->patch(".");
+ aborted = !patcher->patch("");
}
if(!aborted)
@@ -318,7 +303,7 @@ Client::usage(const string& appName)
"-v, --version Display the Ice version.\n"
"-t, --thorough Recalculate all checksums.";
- cerr << "Usage: " << appName << " [options] DIR" << endl;
+ cerr << "Usage: " << appName << " [options] [DIR]" << endl;
cerr << options << endl;
}