Ignore:
Timestamp:
21/02/2010 22:09:37 (2 years ago)
Author:
chris
Message:

Move the test for excluded dirs inside the emu_lstat failure, as
otherwise we don't know whether the file that we couldn't stat was
really a file or a directory, so we can't know whether it should have
been excluded, and the old code allowed dir excludes to make files
appear not to exist locally, and therefore tests to fail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/bin/bbackupquery/BackupQueries.cpp

    r2602 r2625  
    15501550                                localDirEn->d_name); 
    15511551 
    1552                         // Check whether dir is excluded before trying to 
    1553                         // stat it, to fix problems with .gvfs directories 
    1554                         // that are not readable by root causing compare 
    1555                         // to crash: 
    1556                         // http://lists.boxbackup.org/pipermail/boxbackup/2010-January/000013.html 
    1557                         if(rParams.IsExcludedDir(localDirPath)) 
    1558                         { 
    1559                                 rParams.NotifyExcludedDir(localDirPath, 
    1560                                         storeDirPath); 
    1561                                 continue; 
    1562                         } 
    1563  
    15641552#ifndef HAVE_VALID_DIRENT_D_TYPE 
    15651553                        EMU_STRUCT_STAT st; 
    15661554                        if(EMU_LSTAT(localDirPath.c_str(), &st) != 0) 
    15671555                        { 
    1568                             THROW_EXCEPTION_MESSAGE(CommonException, 
    1569                                 OSFileError, localDirPath); 
     1556                                // Check whether dir is excluded before trying 
     1557                                // to stat it, to fix problems with .gvfs 
     1558                                // directories that are not readable by root 
     1559                                // causing compare to crash: 
     1560                                // http://lists.boxbackup.org/pipermail/boxbackup/2010-January/000013.html 
     1561                                if(rParams.IsExcludedDir(localDirPath)) 
     1562                                { 
     1563                                        rParams.NotifyExcludedDir(localDirPath, 
     1564                                                storeDirPath); 
     1565                                        continue; 
     1566                                } 
     1567                                else 
     1568                                { 
     1569                                        THROW_EXCEPTION_MESSAGE(CommonException, 
     1570                                                OSFileError, localDirPath); 
     1571                                } 
    15701572                        } 
    15711573                         
Note: See TracChangeset for help on using the changeset viewer.