diff options
author | Marc Laukien <marc@zeroc.com> | 2002-04-07 22:56:22 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-04-07 22:56:22 +0000 |
commit | f35881fbbdabc08f0b9e194600cf882a21d7cc3d (patch) | |
tree | e8b56ea22f57450507f123a42d267d7db97b642b /cpp/src | |
parent | remove orphaned files (diff) | |
download | ice-f35881fbbdabc08f0b9e194600cf882a21d7cc3d.tar.bz2 ice-f35881fbbdabc08f0b9e194600cf882a21d7cc3d.tar.xz ice-f35881fbbdabc08f0b9e194600cf882a21d7cc3d.zip |
remove orphaned files
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IcePatch/Client.cpp | 12 | ||||
-rw-r--r-- | cpp/src/IcePatch/Server.cpp | 5 | ||||
-rw-r--r-- | cpp/src/IcePatch/Util.cpp | 2 |
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)); |