From 08c9524181c53855e7d86df391388cab2c2b9ef0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 7 Feb 2014 20:22:51 +0000 Subject: Rename BackupStoreContext.GetStoreRoot() to GetAccountRoot(). More accurate name for this variable. --- lib/backupstore/BackupCommands.cpp | 2 +- lib/backupstore/BackupStoreContext.cpp | 6 +++--- lib/backupstore/BackupStoreContext.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/backupstore/BackupCommands.cpp b/lib/backupstore/BackupCommands.cpp index 318ce55a..8f113a41 100644 --- a/lib/backupstore/BackupCommands.cpp +++ b/lib/backupstore/BackupCommands.cpp @@ -388,7 +388,7 @@ std::auto_ptr BackupProtocolGetFile::DoCommand(BackupProt // Choose a temporary filename for the result of the combination std::ostringstream fs; - fs << rContext.GetStoreRoot() << ".recombinetemp." << p; + fs << rContext.GetAccountRoot() << ".recombinetemp." << p; std::string tempFn = RaidFileController::DiscSetPathToFileSystemPath( rContext.GetStoreDiscSet(), fs.str(), diff --git a/lib/backupstore/BackupStoreContext.cpp b/lib/backupstore/BackupStoreContext.cpp index 2c98b1d7..d661684a 100644 --- a/lib/backupstore/BackupStoreContext.cpp +++ b/lib/backupstore/BackupStoreContext.cpp @@ -133,7 +133,7 @@ bool BackupStoreContext::AttemptToGetWriteLock() { // Make the filename of the write lock file std::string writeLockFile; - StoreStructure::MakeWriteLockFilename(mStoreRoot, mStoreDiscSet, writeLockFile); + StoreStructure::MakeWriteLockFilename(mAccountRootDir, mStoreDiscSet, writeLockFile); // Request the lock bool gotLock = mWriteLock.TryAndGetLock(writeLockFile.c_str(), 0600 /* restrictive file permissions */); @@ -183,7 +183,7 @@ void BackupStoreContext::LoadStoreInfo() } // Load it up! - std::auto_ptr i(BackupStoreInfo::Load(mClientID, mStoreRoot, mStoreDiscSet, mReadOnly)); + std::auto_ptr i(BackupStoreInfo::Load(mClientID, mAccountRootDir, mStoreDiscSet, mReadOnly)); // Check it if(i->GetAccountID() != mClientID) @@ -263,7 +263,7 @@ void BackupStoreContext::SaveStoreInfo(bool AllowDelay) void BackupStoreContext::MakeObjectFilename(int64_t ObjectID, std::string &rOutput, bool EnsureDirectoryExists) { // Delegate to utility function - StoreStructure::MakeObjectFilename(ObjectID, mStoreRoot, mStoreDiscSet, rOutput, EnsureDirectoryExists); + StoreStructure::MakeObjectFilename(ObjectID, mAccountRootDir, mStoreDiscSet, rOutput, EnsureDirectoryExists); } diff --git a/lib/backupstore/BackupStoreContext.h b/lib/backupstore/BackupStoreContext.h index c411d5f5..9440950c 100644 --- a/lib/backupstore/BackupStoreContext.h +++ b/lib/backupstore/BackupStoreContext.h @@ -85,7 +85,6 @@ public: bool SessionIsReadOnly() {return mReadOnly;} bool AttemptToGetWriteLock(); - void SetClientHasAccount(const std::string &rStoreRoot, int StoreDiscSet) {mClientHasAccount = true; mStoreRoot = rStoreRoot; mStoreDiscSet = StoreDiscSet;} // Not really an API, but useful for BackupProtocolLocal2. void ReleaseWriteLock() { @@ -95,8 +94,9 @@ public: } } + void SetClientHasAccount(const std::string &rStoreRoot, int StoreDiscSet) {mClientHasAccount = true; mAccountRootDir = rStoreRoot; mStoreDiscSet = StoreDiscSet;} bool GetClientHasAccount() const {return mClientHasAccount;} - const std::string &GetStoreRoot() const {return mStoreRoot;} + const std::string &GetAccountRoot() const {return mAccountRootDir;} int GetStoreDiscSet() const {return mStoreDiscSet;} // Store info @@ -175,7 +175,7 @@ private: HousekeepingInterface &mrDaemon; int mProtocolPhase; bool mClientHasAccount; - std::string mStoreRoot; // has final directory separator + std::string mAccountRootDir; // has final directory separator int mStoreDiscSet; bool mReadOnly; NamedLock mWriteLock; -- cgit v1.2.3