Ignore:
Timestamp:
29/03/2009 14:51:24 (3 years ago)
Author:
chris
Message:

Change type of BackupStoreFilename? not to derive from std::string, so
it can't accidentally be used as one.

Fix use of encrypted filename in deleted file message, thanks to Kenny
Millington for reporting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/backupclient/BackupStoreFilename.h

    r217 r2481  
    4141// 
    4242// -------------------------------------------------------------------------- 
    43 class BackupStoreFilename : public BackupStoreFilename_base 
     43class BackupStoreFilename /* : public BackupStoreFilename_base */ 
    4444{ 
     45private: 
     46        std::string mEncryptedName; 
     47 
    4548public: 
    4649        BackupStoreFilename(); 
     
    7275        }; 
    7376 
     77        const std::string& GetEncodedFilename() const 
     78        { 
     79                return mEncryptedName; 
     80        } 
     81 
     82        bool operator==(const BackupStoreFilename& rOther) const 
     83        { 
     84                return mEncryptedName == rOther.mEncryptedName; 
     85        } 
     86 
     87        bool operator!=(const BackupStoreFilename& rOther) const 
     88        { 
     89                return mEncryptedName != rOther.mEncryptedName; 
     90        } 
     91 
    7492protected: 
    7593        virtual void EncodedFilenameChanged(); 
     94        void SetEncodedFilename(const std::string &rEncoded) 
     95        { 
     96                mEncryptedName = rEncoded; 
     97        } 
    7698}; 
    7799 
Note: See TracChangeset for help on using the changeset viewer.