diff options
author | Marc Laukien <marc@zeroc.com> | 2002-05-07 15:38:29 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-05-07 15:38:29 +0000 |
commit | c6f0fb5aa95e0b913f40065e999df17e66821d5c (patch) | |
tree | 0b3b1739f22f5fc7d4e1d15d7856a6251dc98bf7 /cpp/src/IcePatch/Client.cpp | |
parent | Fix for the Xerces-c related memory leaks. (diff) | |
download | ice-c6f0fb5aa95e0b913f40065e999df17e66821d5c.tar.bz2 ice-c6f0fb5aa95e0b913f40065e999df17e66821d5c.tar.xz ice-c6f0fb5aa95e0b913f40065e999df17e66821d5c.zip |
wishpatch client fix
Diffstat (limited to 'cpp/src/IcePatch/Client.cpp')
-rw-r--r-- | cpp/src/IcePatch/Client.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cpp/src/IcePatch/Client.cpp b/cpp/src/IcePatch/Client.cpp index 6ae2bf494da..2d7447b7497 100644 --- a/cpp/src/IcePatch/Client.cpp +++ b/cpp/src/IcePatch/Client.cpp @@ -83,7 +83,7 @@ IcePatch::Client::run(int argc, char* argv[]) } vector<string> subdirs; - if (argc >= 1) + if (argc > 1) { for (int i = 1; i < argc; ++i) { @@ -210,6 +210,23 @@ IcePatch::Client::run(int argc, char* argv[]) DirectoryDescPtr topDesc = DirectoryDescPtr::dynamicCast(top->describe()); assert(topDesc); string path = identityToPath(topDesc->directory->ice_getIdentity()); + string::size_type pos = 0; + while (pos < path.size()) + { + string::size_type pos2 = path.find('/', pos); + if (pos2 == string::npos) + { + pos2 = path.size(); + } + string subPath = path.substr(0, pos2); + FileInfo subPathInfo = getFileInfo(subPath, false); + if (subPathInfo.type == FileTypeNotExist) + { + createDirectory(subPath); + cout << subPath << ": created" << endl; + } + pos = pos2 + 1; + } cout << pathToName(path) << endl; cout << "|" << endl; patch(topDesc->directory->getContents(), ""); |