Changeset 2194


Ignore:
Timestamp:
19/06/2008 08:43:31 (4 years ago)
Author:
chris
Message:

Larger buffer size for extended attributes, and better debugging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/backupclient/BackupClientFileAttributes.cpp

    r2149 r2194  
    466466{ 
    467467#ifdef HAVE_SYS_XATTR_H 
    468         int listBufferSize = 1000; 
     468        int listBufferSize = 10000; 
    469469        char* list = new char[listBufferSize]; 
    470470 
     
    562562                        outputBlock.ResizeBlock(xattrSize); 
    563563                } 
    564                 else if(listSize<0 && errno!=EOPNOTSUPP && errno!=EACCES) 
    565                 { 
    566                         THROW_EXCEPTION(CommonException, OSFileError); 
     564                else if(listSize<0) 
     565                { 
     566                        if(errno == EOPNOTSUPP || errno == EACCES) 
     567                        { 
     568                                // fail silently 
     569                        } 
     570                        else if(errno == ERANGE) 
     571                        { 
     572                                BOX_ERROR("Failed to read extended " 
     573                                        "attributes of " << Filename << 
     574                                        ": buffer too small, not backed up"); 
     575                        } 
     576                        else 
     577                        { 
     578                                BOX_LOG_SYS_ERROR("Failed to read extended " 
     579                                        "attributes of " << Filename << 
     580                                        ", not backed up"); 
     581                                THROW_EXCEPTION(CommonException, OSFileError); 
     582                        } 
    567583                } 
    568584        } 
Note: See TracChangeset for help on using the changeset viewer.