Changeset 1926

Show
Ignore:
Timestamp:
06/11/2007 23:25:48 (14 months ago)
Author:
chris
Message:

Ensure that restore failure sets the return code from bbackupquery, so
that symlink following test fails.

Files:
1 modified

Legend:

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

    r1911 r1926  
    20292029        { 
    20302030                BOX_ERROR("Failed to restore: " << e.what()); 
     2031                SetReturnCode(COMMAND_RETURN_ERROR); 
    20312032                return; 
    20322033        } 
     
    20342035        { 
    20352036                BOX_ERROR("Failed to restore: unknown exception"); 
     2037                SetReturnCode(COMMAND_RETURN_ERROR); 
    20362038                return; 
    20372039        } 
     
    20452047        case Restore_ResumePossible: 
    20462048                BOX_ERROR("Resume possible -- repeat command with -r flag to resume"); 
     2049                SetReturnCode(COMMAND_RETURN_ERROR); 
    20472050                break; 
    20482051         
    20492052        case Restore_TargetExists: 
    20502053                BOX_ERROR("The target directory exists. You cannot restore over an existing directory."); 
     2054                SetReturnCode(COMMAND_RETURN_ERROR); 
    20512055                break; 
    20522056                 
     
    20562060                        "To restore to a directory whose parent " 
    20572061                        "does not exist, create the parent first."); 
     2062                SetReturnCode(COMMAND_RETURN_ERROR); 
    20582063                break; 
    20592064        #endif 
     
    20612066        case Restore_UnknownError: 
    20622067                BOX_ERROR("Unknown error during restore."); 
     2068                SetReturnCode(COMMAND_RETURN_ERROR); 
    20632069                break; 
    20642070 
    20652071        default: 
    20662072                BOX_ERROR("Unknown restore result " << result << "."); 
     2073                SetReturnCode(COMMAND_RETURN_ERROR); 
    20672074                break; 
    20682075        }