[Box Backup-commit] COMMIT r3454 - box/trunk/bin/bbackupd
subversion at boxbackup.org
subversion at boxbackup.org
Wed Dec 10 23:39:16 GMT 2014
Author: chris
Date: 2014-12-10 23:39:15 +0000 (Wed, 10 Dec 2014)
New Revision: 3454
Modified:
box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h
Log:
Reformat long lines for readability, fix whitespace errors.
Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp 2014-12-10 23:27:59 UTC (rev 3453)
+++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp 2014-12-10 23:39:15 UTC (rev 3454)
@@ -275,11 +275,11 @@
}
else
{
- rNotifier.NotifyDirListFailed(this,
+ rNotifier.NotifyDirListFailed(this,
nonVssDirPath,
strerror(errno));
}
-
+
// Report the error (logs and eventual email
// to administrator)
SetErrorWhenReadingFilesystemObject(rParams,
@@ -581,15 +581,19 @@
ContainingDirectoryID));
}
// Consider asking the store for it
- else if(!mInitialSyncDone || checksumDifferent || downloadDirectoryRecordBecauseOfFutureFiles)
+ else if(!mInitialSyncDone || checksumDifferent ||
+ downloadDirectoryRecordBecauseOfFutureFiles)
{
apDirOnStore = FetchDirectoryListing(rParams);
}
-
- // Make sure the attributes are up to date -- if there's space on the server
- // and this directory has not just been created (because it's attributes will be correct in this case)
- // and the checksum is different, implying they *MIGHT* be different.
- if((!ThisDirHasJustBeenCreated) && checksumDifferent && (!rParams.mrContext.StorageLimitExceeded()))
+
+ // Make sure the attributes are up to date -- if there's space
+ // on the server and this directory has not just been created
+ // (because it's attributes will be correct in this case) and
+ // the checksum is different, implying they *MIGHT* be
+ // different.
+ if((!ThisDirHasJustBeenCreated) && checksumDifferent &&
+ !rParams.mrContext.StorageLimitExceeded())
{
UpdateAttributes(rParams, apDirOnStore.get(), rLocalPath);
}
@@ -613,11 +617,13 @@
entriesLeftOver, files, dirs);
// LAST THING! (think exception safety)
- // Store the new checksum -- don't fetch things unnecessarily in the future
- // But... only if 1) the storage limit isn't exceeded -- make sure things are done again if
- // the directory is modified later
- // and 2) All the objects within the directory were stored successfully.
- if(!rParams.mrContext.StorageLimitExceeded() && updateCompleteSuccess)
+ // Store the new checksum -- don't fetch things unnecessarily
+ // in the future But... only if 1) the storage limit isn't
+ // exceeded -- make sure things are done again if the directory
+ // is modified later and 2) All the objects within the
+ // directory were stored successfully.
+ if(!rParams.mrContext.StorageLimitExceeded() &&
+ updateCompleteSuccess)
{
currentStateChecksum.CopyDigestTo(mStateChecksum);
}
@@ -639,13 +645,16 @@
// --------------------------------------------------------------------------
//
// Function
-// Name: BackupClientDirectoryRecord::FetchDirectoryListing(BackupClientDirectoryRecord::SyncParams &)
-// Purpose: Fetch the directory listing of this directory from the store.
+// Name: BackupClientDirectoryRecord::FetchDirectoryListing(
+// BackupClientDirectoryRecord::SyncParams &)
+// Purpose: Fetch the directory listing of this directory from
+// the store.
// Created: 2003/10/09
//
// --------------------------------------------------------------------------
std::auto_ptr<BackupStoreDirectory>
-BackupClientDirectoryRecord::FetchDirectoryListing(BackupClientDirectoryRecord::SyncParams &rParams)
+BackupClientDirectoryRecord::FetchDirectoryListing(
+ BackupClientDirectoryRecord::SyncParams &rParams)
{
std::auto_ptr<BackupStoreDirectory> apDir;
@@ -672,12 +681,18 @@
// --------------------------------------------------------------------------
//
// Function
-// Name: BackupClientDirectoryRecord::UpdateAttributes(BackupClientDirectoryRecord::SyncParams &, const std::string &)
-// Purpose: Sets the attributes of the directory on the store, if necessary
+// Name: BackupClientDirectoryRecord::UpdateAttributes(
+// BackupClientDirectoryRecord::SyncParams &,
+// const std::string &)
+// Purpose: Sets the attributes of the directory on the store,
+// if necessary.
// Created: 2003/10/09
//
// --------------------------------------------------------------------------
-void BackupClientDirectoryRecord::UpdateAttributes(BackupClientDirectoryRecord::SyncParams &rParams, BackupStoreDirectory *pDirOnStore, const std::string &rLocalPath)
+void BackupClientDirectoryRecord::UpdateAttributes(
+ BackupClientDirectoryRecord::SyncParams &rParams,
+ BackupStoreDirectory *pDirOnStore,
+ const std::string &rLocalPath)
{
// Get attributes for the directory
BackupClientFileAttributes attr;
@@ -786,7 +801,7 @@
std::string filenameClear;
try
{
- filenameClear = DecryptFilename(en,
+ filenameClear = DecryptFilename(en,
rRemotePath);
decryptedEntries[filenameClear] = en;
}
Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h
===================================================================
--- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h 2014-12-10 23:27:59 UTC (rev 3453)
+++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h 2014-12-10 23:39:15 UTC (rev 3454)
@@ -106,11 +106,11 @@
bool mHaveLoggedWarningAboutFutureFileTimes;
bool StopRun() { return mrRunStatusProvider.StopRun(); }
- void NotifySysadmin(SysadminNotifier::EventCode Event)
+ void NotifySysadmin(SysadminNotifier::EventCode Event)
{
- mrSysadminNotifier.NotifySysadmin(Event);
+ mrSysadminNotifier.NotifySysadmin(Event);
}
- ProgressNotifier& GetProgressNotifier() const
+ ProgressNotifier& GetProgressNotifier() const
{
return mrProgressNotifier;
}
More information about the Boxbackup-commit
mailing list