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 | |
parent | fixes (diff) | |
download | ice-a4cf1dbc4b6b3b66a8158e887d2a3744f043435e.tar.bz2 ice-a4cf1dbc4b6b3b66a8158e887d2a3744f043435e.tar.xz ice-a4cf1dbc4b6b3b66a8158e887d2a3744f043435e.zip |
fixes
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IcePatch/Client.cpp | 20 | ||||
-rw-r--r-- | cpp/src/IcePatch/IcePatchI.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IcePatch/Server.cpp | 8 |
3 files changed, 16 insertions, 16 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); diff --git a/cpp/src/IcePatch/IcePatchI.cpp b/cpp/src/IcePatch/IcePatchI.cpp index 5dbf5709caa..c50661455b7 100644 --- a/cpp/src/IcePatch/IcePatchI.cpp +++ b/cpp/src/IcePatch/IcePatchI.cpp @@ -83,7 +83,7 @@ IcePatch::DirectoryI::describe(const Current& current) const // No mutex lock necessary. DirectoryDescPtr desc = new DirectoryDesc; desc->md5 = readMD5(current); - desc->directory = DirectoryPrx::uncheckedCast(_adapter->createProxy(current.id)); + desc->dir = DirectoryPrx::uncheckedCast(_adapter->createProxy(current.id)); return desc; } @@ -174,7 +174,7 @@ IcePatch::RegularI::describe(const Current& current) const // No mutex lock necessary. RegularDescPtr desc = new RegularDesc; desc->md5 = readMD5(current); - desc->regular = RegularPrx::uncheckedCast(_adapter->createProxy(current.id)); + desc->reg = RegularPrx::uncheckedCast(_adapter->createProxy(current.id)); return desc; } diff --git a/cpp/src/IcePatch/Server.cpp b/cpp/src/IcePatch/Server.cpp index 222fc7a80d6..6bc7de74198 100644 --- a/cpp/src/IcePatch/Server.cpp +++ b/cpp/src/IcePatch/Server.cpp @@ -185,7 +185,7 @@ IcePatch::Updater::run() assert(top); DirectoryDescPtr topDesc = DirectoryDescPtr::dynamicCast(top->describe()); assert(topDesc); - cleanup(topDesc->directory->getContents()); + cleanup(topDesc->dir->getContents()); } catch(const FileAccessException& ex) { @@ -247,14 +247,14 @@ IcePatch::Updater::cleanup(const FileDescSeq& fileDescSeq) // Force MD5 files to be created and orphaned files to be // removed. // - cleanup(directoryDesc->directory->getContents()); + cleanup(directoryDesc->dir->getContents()); // // Call describe(), because MD5 files in subdirectories // might have changed, resulting in a different summary // MD5 for this directory. // - directoryDesc->directory->describe(); + directoryDesc->dir->describe(); } else { @@ -264,7 +264,7 @@ IcePatch::Updater::cleanup(const FileDescSeq& fileDescSeq) // // Force BZ2 files to be created for all regular files. // - regularDesc->regular->getBZ2Size(); + regularDesc->reg->getBZ2Size(); } } } |