Ignore:
Timestamp:
28/05/2008 16:24:05 (4 years ago)
Author:
chris
Message:

Track and log file deletions by name.

Split crypto init and file sync process into its own method, to reduce
call depth and facilitate calling in process from tests.

Differentiate between 3 uses of stat in BackupClientDirectoryRecord? by
renaming the structures.

Use stat instead of lstat when checking the filesystem that's holding an
entity, in case it's a symbolic link to a different filesystem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/bin/bbackupd/BackupClientDeleteList.h

    r217 r2181  
    2929class BackupClientDeleteList 
    3030{ 
     31private: 
     32        class FileToDelete 
     33        { 
     34                public: 
     35                int64_t mDirectoryID; 
     36                BackupStoreFilename mFilename; 
     37                std::string mLocalPath; 
     38                FileToDelete(int64_t DirectoryID,  
     39                        const BackupStoreFilename& rFilename, 
     40                        const std::string& rLocalPath); 
     41        }; 
     42 
     43        class DirToDelete 
     44        { 
     45                public: 
     46                int64_t mObjectID; 
     47                std::string mLocalPath; 
     48                DirToDelete(int64_t ObjectID, const std::string& rLocalPath); 
     49        }; 
     50 
    3151public: 
    3252        BackupClientDeleteList(); 
    3353        ~BackupClientDeleteList(); 
    3454         
    35         void AddDirectoryDelete(int64_t ObjectID); 
    36         void AddFileDelete(int64_t DirectoryID, const BackupStoreFilename &rFilename); 
     55        void AddDirectoryDelete(int64_t ObjectID, 
     56                const std::string& rLocalPath); 
     57        void AddFileDelete(int64_t DirectoryID, 
     58                const BackupStoreFilename &rFilename, 
     59                const std::string& rLocalPath); 
    3760 
    3861        void StopDirectoryDeletion(int64_t ObjectID); 
    39         void StopFileDeletion(int64_t DirectoryID, const BackupStoreFilename &rFilename); 
     62        void StopFileDeletion(int64_t DirectoryID, 
     63                const BackupStoreFilename &rFilename); 
    4064         
    4165        void PerformDeletions(BackupClientContext &rContext); 
    4266         
    4367private: 
    44         std::vector<int64_t> mDirectoryList; 
     68        std::vector<DirToDelete> mDirectoryList; 
    4569        std::set<int64_t> mDirectoryNoDeleteList;       // note: things only get in this list if they're not present in mDirectoryList when they are 'added' 
    46         std::vector<std::pair<int64_t, BackupStoreFilename> > mFileList; 
     70        std::vector<FileToDelete> mFileList; 
    4771        std::vector<std::pair<int64_t, BackupStoreFilename> > mFileNoDeleteList; 
    4872}; 
Note: See TracChangeset for help on using the changeset viewer.