Skip to content

Commit

Permalink
Add a constant for WRITE_LOCK_FILENAME
Browse files Browse the repository at this point in the history
  • Loading branch information
qris committed Jan 8, 2018
1 parent f17b2da commit be929a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/backupstore/BackupConstants.h
Expand Up @@ -19,6 +19,7 @@
// Should the store daemon convert files to Raid immediately?
#define BACKUP_STORE_CONVERT_TO_RAID_IMMEDIATELY true

#endif // BACKUPCONSTANTS__H
#define WRITE_LOCK_FILENAME "write.lock"

#endif // BACKUPCONSTANTS__H

4 changes: 3 additions & 1 deletion lib/backupstore/StoreStructure.cpp
Expand Up @@ -9,6 +9,7 @@

#include "Box.h"

#include "BackupConstants.h"
#include "StoreStructure.h"
#include "RaidFileRead.h"
#include "RaidFileWrite.h"
Expand Down Expand Up @@ -86,7 +87,8 @@ void StoreStructure::MakeWriteLockFilename(const std::string &rStoreRoot, int Di
RaidFileDiscSet &rdiscSet(rcontroller.GetDiscSet(DiscSet));

// Make the filename
std::string writeLockFile(rdiscSet[0] + DIRECTORY_SEPARATOR + rStoreRoot + "write.lock");
std::string writeLockFile(rdiscSet[0] + DIRECTORY_SEPARATOR + rStoreRoot +
WRITE_LOCK_FILENAME);

// Return it to the caller
rFilenameOut = writeLockFile;
Expand Down

0 comments on commit be929a1

Please sign in to comment.