Changeset 2142

Show
Ignore:
Timestamp:
09/04/2008 21:01:56 (2 years ago)
Author:
chris
Message:

Check the return code from system commands in bbackupquery, and if not
zero, give a warning and set the bbackupquery return code to
COMMAND_RETURN_ERROR.

Check for Restore_TargetPathNotFound on all platforms as it's not specific
to Windows.

Files:
1 modified

Legend:

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

    r2127 r2142  
    118118        { 
    119119                // Yes, run shell command 
    120                 ::system(Command + 3); 
     120                int result = ::system(Command + 3); 
     121                if(result != 0) 
     122                { 
     123                        BOX_WARNING("System command returned error code " << 
     124                                result); 
     125                        SetReturnCode(COMMAND_RETURN_ERROR); 
     126                } 
    121127                return; 
    122128        } 
     
    20552061                break; 
    20562062                 
    2057         #ifdef WIN32 
    20582063        case Restore_TargetPathNotFound: 
    20592064                BOX_ERROR("The target directory path does not exist.\n" 
     
    20622067                SetReturnCode(COMMAND_RETURN_ERROR); 
    20632068                break; 
    2064         #endif 
    20652069 
    20662070        case Restore_UnknownError: