diff options
author | Marc Laukien <marc@zeroc.com> | 2002-09-11 23:38:29 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-09-11 23:38:29 +0000 |
commit | a4cf1dbc4b6b3b66a8158e887d2a3744f043435e (patch) | |
tree | 5fd2d042a22ec6a30bb590d88036a0079bc6bb07 /cpp/src/IcePatch/Client.cpp | |
parent | fixes (diff) | |
download | ice-a4cf1dbc4b6b3b66a8158e887d2a3744f043435e.tar.bz2 ice-a4cf1dbc4b6b3b66a8158e887d2a3744f043435e.tar.xz ice-a4cf1dbc4b6b3b66a8158e887d2a3744f043435e.zip |
fixes
Diffstat (limited to 'cpp/src/IcePatch/Client.cpp')
-rw-r--r-- | cpp/src/IcePatch/Client.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cpp/src/IcePatch/Client.cpp b/cpp/src/IcePatch/Client.cpp index d991b6e5ff3..19a32bd8a30 100644 --- a/cpp/src/IcePatch/Client.cpp +++ b/cpp/src/IcePatch/Client.cpp @@ -19,6 +19,7 @@ #ifdef _WIN32 # include <direct.h> #endif +#include <set> using namespace std; using namespace Ice; @@ -372,15 +373,14 @@ IcePatch::Client::patch(const DirectoryDescPtr& dirDesc, const string& indent) c set<string> orphaned; if(_remove) { - StringSeq fullDirectoryListing = readDirectory(identityToPath(dirDesc->directory->ice_getIdentity())); - orphaned.reserve(fullDirectoryListing.size()); + StringSeq fullDirectoryListing = readDirectory(identityToPath(dirDesc->dir->ice_getIdentity())); for(StringSeq::const_iterator p = fullDirectoryListing.begin(); p != fullDirectoryListing.end(); ++p) { - orphaned.insert(*p) + orphaned.insert(*p); } } - FileDescSeq fileDescSeq = dirDesc->directory->getContents(); + FileDescSeq fileDescSeq = dirDesc->dir->getContents(); for(unsigned int i = 0; i < fileDescSeq.size(); ++i) { @@ -389,13 +389,13 @@ IcePatch::Client::patch(const DirectoryDescPtr& dirDesc, const string& indent) c RegularDescPtr regDesc; if(subDirDesc) { - path = identityToPath(subDirDesc->directory->ice_getIdentity()); + path = identityToPath(subDirDesc->dir->ice_getIdentity()); } else { regDesc = RegularDescPtr::dynamicCast(fileDescSeq[i]); assert(regDesc); - path = identityToPath(regDesc->regular->ice_getIdentity()); + path = identityToPath(regDesc->reg->ice_getIdentity()); } if(_remove) @@ -483,14 +483,14 @@ IcePatch::Client::patch(const DirectoryDescPtr& dirDesc, const string& indent) c { case FileTypeNotExist: { - getRegular(regDesc->regular, progressCB); + getRegular(regDesc->reg, progressCB); break; } case FileTypeDirectory: { removeRecursive(path); - getRegular(regDesc->regular, progressCB); + getRegular(regDesc->reg, progressCB); break; } @@ -508,7 +508,7 @@ IcePatch::Client::patch(const DirectoryDescPtr& dirDesc, const string& indent) c if(md5 != regDesc->md5) { removeRecursive(path); - getRegular(regDesc->regular, progressCB); + getRegular(regDesc->reg, progressCB); } else { @@ -521,7 +521,7 @@ IcePatch::Client::patch(const DirectoryDescPtr& dirDesc, const string& indent) c } } - for(StringSeq::const_iterator p = orphaned.begin(); p != orphaned.end(); ++p) + for(set<string>::const_iterator p = orphaned.begin(); p != orphaned.end(); ++p) { cout << indent << "+-" << pathToName(*p) << ": removing orphaned file" << endl; removeRecursive(*p); |