diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IcePatch/Client.cpp | 12 | ||||
-rw-r--r-- | cpp/src/IcePatch/IcePatchI.cpp | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/cpp/src/IcePatch/Client.cpp b/cpp/src/IcePatch/Client.cpp index 21fc1f9880e..1fe50d674e3 100644 --- a/cpp/src/IcePatch/Client.cpp +++ b/cpp/src/IcePatch/Client.cpp @@ -248,8 +248,15 @@ IcePatch::Client::run(int argc, char* argv[]) { Identity identity = pathToIdentity(*p); ObjectPrx topObj = communicator()->stringToProxy(identityToString(identity) + ':' + endpoints); - - FilePrx top = FilePrx::checkedCast(topObj); + FilePrx top; + try + { + top = FilePrx::checkedCast(topObj); + } + catch(const ObjectNotExistException&) + { + } + if(!top) { cerr << appName() << ": `" << *p << "' does not exist" << endl; @@ -282,7 +289,6 @@ IcePatch::Client::run(int argc, char* argv[]) } cout << pathToName(*p) << endl; - cout << "|" << endl; patch(topDesc, ""); } diff --git a/cpp/src/IcePatch/IcePatchI.cpp b/cpp/src/IcePatch/IcePatchI.cpp index 55d8f66b387..19cd69e0203 100644 --- a/cpp/src/IcePatch/IcePatchI.cpp +++ b/cpp/src/IcePatch/IcePatchI.cpp @@ -95,7 +95,7 @@ IcePatch::DirectoryI::getContents(const Current& current) const syncUpgraded = true; } StringSeq paths2 = readDirectory(path); - paths.erase(remove(paths2.begin(), paths2.end(), ".icepatch"), paths2.end()); + paths2.erase(remove(paths2.begin(), paths2.end(), ".icepatch"), paths2.end()); pair<StringSeq::const_iterator, StringSeq::const_iterator> r2 = equal_range(paths2.begin(), paths2.end(), removeSuffix(*p)); if(r2.first == r2.second) |