Changeset 3023 for box


Ignore:
Timestamp:
12/10/2011 00:08:01 (8 months ago)
Author:
chris
Message:

Fix excludions on VSS paths by converting back to original namespace before
checking for them. Also simplifies code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp

    r2992 r3023  
    310310                                // Stat file to get info 
    311311                                filename = MakeFullPath(rLocalPath, en->d_name); 
     312                                std::string realFileName = ConvertVssPathToRealPath(filename, 
     313                                        rBackupLocation); 
    312314 
    313315                                #ifdef WIN32 
     
    332334 
    333335                                #else // !WIN32 
    334  
    335336                                if(EMU_LSTAT(filename.c_str(), &file_st) != 0) 
    336337                                { 
     
    409410 
    410411                                        // Exclude it? 
    411                                         if(rParams.mrContext.ExcludeFile(filename)) 
     412                                        if(rParams.mrContext.ExcludeFile(realFileName)) 
    412413                                        { 
    413                                                 rNotifier.NotifyFileExcluded(this, 
    414                                                         ConvertVssPathToRealPath(filename, rBackupLocation)); 
    415  
     414                                                rNotifier.NotifyFileExcluded(this, realFileName); 
    416415                                                // Next item! 
    417416                                                continue; 
     
    426425 
    427426                                        // Exclude it? 
    428                                         if(rParams.mrContext.ExcludeDir(filename)) 
     427                                        if(rParams.mrContext.ExcludeDir(realFileName)) 
    429428                                        { 
    430                                                 rNotifier.NotifyDirExcluded(this, 
    431                                                         ConvertVssPathToRealPath(filename, rBackupLocation)); 
     429                                                rNotifier.NotifyDirExcluded(this, realFileName); 
    432430 
    433431                                                // Next item! 
     
    442440                                        if (en->d_type & FILE_ATTRIBUTE_REPARSE_POINT) 
    443441                                        { 
    444                                                 rNotifier.NotifyMountPointSkipped(this, 
    445                                                         ConvertVssPathToRealPath(filename, rBackupLocation)); 
     442                                                rNotifier.NotifyMountPointSkipped(this, realFileName); 
    446443                                                continue; 
    447444                                        } 
     
    451448                                        dirs.push_back(std::string(en->d_name)); 
    452449                                } 
    453                                 else 
     450                                else // not a file or directory, what is it? 
    454451                                { 
    455452                                        if (type == S_IFSOCK 
     
    462459                                                // see Debian bug 479145, no objections 
    463460                                        } 
    464                                         else if(rParams.mrContext.ExcludeFile(filename)) 
     461                                        else if(rParams.mrContext.ExcludeFile(realFileName)) 
    465462                                        { 
    466                                                 rNotifier.NotifyFileExcluded(this,  
    467                                                         ConvertVssPathToRealPath(filename, rBackupLocation)); 
     463                                                rNotifier.NotifyFileExcluded(this, realFileName); 
    468464                                        } 
    469465                                        else 
    470466                                        { 
    471                                                 rNotifier.NotifyUnsupportedFileType(this,  
    472                                                         ConvertVssPathToRealPath(filename, rBackupLocation)); 
     467                                                rNotifier.NotifyUnsupportedFileType(this, 
     468                                                        realFileName); 
    473469                                                SetErrorWhenReadingFilesystemObject(rParams, 
    474                                                         ConvertVssPathToRealPath(filename, rBackupLocation)); 
     470                                                        realFileName); 
    475471                                        } 
    476472 
Note: See TracChangeset for help on using the changeset viewer.