summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IcePatch/Client.cpp12
-rw-r--r--cpp/src/IcePatch/Server.cpp5
-rw-r--r--cpp/src/IcePatch/Util.cpp2
3 files changed, 13 insertions, 6 deletions
diff --git a/cpp/src/IcePatch/Client.cpp b/cpp/src/IcePatch/Client.cpp
index aa54362f79f..d365edcb918 100644
--- a/cpp/src/IcePatch/Client.cpp
+++ b/cpp/src/IcePatch/Client.cpp
@@ -98,11 +98,6 @@ IcePatch::Client::run(int argc, char* argv[])
communicator()->addObjectFactory(factory, "::IcePatch::FileDesc");
//
- // Remove orphaned MD5 and BZ2 files.
- //
- removeOrphanedRecursive(".");
-
- //
// Patch all nodes.
//
Identity identity = pathToIdentity(".");
@@ -115,6 +110,13 @@ IcePatch::Client::run(int argc, char* argv[])
cout << pathToName(path) << endl;
cout << "|" << endl;
patch(topDesc->directory->getContents(), "");
+
+ //
+ // Remove orphaned MD5 and BZ2 files.
+ //
+ cout << "removing orphaned .bz2 and .md5 files... " << flush;
+ removeOrphanedRecursive(".");
+ cout << "ok" << endl;
}
catch (const NodeAccessException& ex)
{
diff --git a/cpp/src/IcePatch/Server.cpp b/cpp/src/IcePatch/Server.cpp
index ae3070a7ddc..3d515aacfd9 100644
--- a/cpp/src/IcePatch/Server.cpp
+++ b/cpp/src/IcePatch/Server.cpp
@@ -87,6 +87,11 @@ IcePatch::Server::run(int argc, char* argv[])
{
changeDirectory(directory);
}
+
+ //
+ // Remove orphaned MD5 and BZ2 files.
+ //
+ removeOrphanedRecursive(".");
//
// Create MD5 and BZ2 files.
diff --git a/cpp/src/IcePatch/Util.cpp b/cpp/src/IcePatch/Util.cpp
index 0b59e8be821..76b9c004fa0 100644
--- a/cpp/src/IcePatch/Util.cpp
+++ b/cpp/src/IcePatch/Util.cpp
@@ -721,7 +721,7 @@ IcePatch::removeOrphanedRecursive(const string& path)
for (p = paths.begin(); p != paths.end(); ++p)
{
string suffix = getSuffix(*p);
- if (suffix == ".md5" || suffix == ".bz2")
+ if (suffix == "md5" || suffix == "bz2")
{
pair<StringSeq::const_iterator, StringSeq::const_iterator> r =
equal_range(paths.begin(), paths.end(), removeSuffix(*p));