Changeset 2828 for box/trunk/lib
- Timestamp:
- 08/01/2011 21:33:19 (17 months ago)
- Location:
- box/trunk/lib/backupclient
- Files:
-
- 4 edited
-
BackupClientFileAttributes.cpp (modified) (1 diff)
-
BackupClientRestore.cpp (modified) (6 diffs)
-
BackupClientRestore.h (modified) (1 diff)
-
BackupStoreFile.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/backupclient/BackupClientFileAttributes.cpp
r2636 r2828 844 844 if(::utimes(Filename, times) != 0) 845 845 { 846 BOX_LOG_SYS_ERROR("Failed to change times of " 847 "file '" << Filename << "'"); 848 THROW_EXCEPTION(CommonException, OSFileError) 846 BOX_LOG_SYS_WARNING("Failed to change times of " 847 "file '" << Filename << "' to ctime=" << 848 BOX_FORMAT_TIMESPEC(times[0]) << ", mtime=" << 849 BOX_FORMAT_TIMESPEC(times[1])); 849 850 } 850 851 } -
box/trunk/lib/backupclient/BackupClientRestore.cpp
r2170 r2828 212 212 // -------------------------------------------------------------------------- 213 213 static int BackupClientRestoreDir(BackupProtocolClient &rConnection, 214 int64_t DirectoryID, std::string &rLocalDirectoryName, 214 int64_t DirectoryID, const std::string &rRemoteDirectoryName, 215 const std::string &rLocalDirectoryName, 215 216 RestoreParams &Params, RestoreResumeInfo &rLevel) 216 217 { … … 224 225 rLevel.mNextLevelLocalName); 225 226 BackupClientRestoreDir(rConnection, rLevel.mNextLevelID, 226 localDirname, Params, *rLevel.mpNextLevel); 227 rRemoteDirectoryName + '/' + 228 rLevel.mNextLevelLocalName, localDirname, 229 Params, *rLevel.mpNextLevel); 227 230 228 231 // Add it to the list of done itmes … … 527 530 } 528 531 532 BOX_TRACE("Restoring file: " << 533 rRemoteDirectoryName + '/' + 534 nm.GetClearFilename() << " (" << 535 en->GetSizeInBlocks() << " blocks)"); 536 529 537 // Request it from the store 530 538 rConnection.QueryGetFile(DirectoryID, … … 740 748 741 749 // Recurse 750 751 BOX_TRACE("Entering directory: " << 752 rRemoteDirectoryName + '/' + 753 nm.GetClearFilename()); 754 742 755 int result = BackupClientRestoreDir( 743 756 rConnection, en->GetObjectID(), 744 localDirname, Params, rnextLevel); 757 rRemoteDirectoryName + '/' + 758 nm.GetClearFilename(), localDirname, 759 Params, rnextLevel); 745 760 746 761 if (result != Restore_Complete) … … 825 840 // -------------------------------------------------------------------------- 826 841 int BackupClientRestore(BackupProtocolClient &rConnection, 827 int64_t DirectoryID, const char * LocalDirectoryName,828 bool PrintDots, bool RestoreDeleted,842 int64_t DirectoryID, const char *RemoteDirectoryName, 843 const char *LocalDirectoryName, bool PrintDots, bool RestoreDeleted, 829 844 bool UndeleteAfterRestoreDeleted, bool Resume, 830 845 bool ContinueAfterErrors) … … 873 888 874 889 // Restore the directory 875 std::string localName(LocalDirectoryName);876 890 int result = BackupClientRestoreDir(rConnection, DirectoryID, 877 localName, params, params.mResumeInfo); 891 RemoteDirectoryName, LocalDirectoryName, params, 892 params.mResumeInfo); 878 893 if (result != Restore_Complete) 879 894 { -
box/trunk/lib/backupclient/BackupClientRestore.h
r2157 r2828 25 25 int BackupClientRestore(BackupProtocolClient &rConnection, 26 26 int64_t DirectoryID, 27 const char *RemoteDirectoryName, 27 28 const char *LocalDirectoryName, 28 29 bool PrintDots = false, -
box/trunk/lib/backupclient/BackupStoreFile.cpp
r2804 r2828 315 315 316 316 // Write the attributes 317 stream->GetAttributes().WriteAttributes(DecodedFilename); 317 try 318 { 319 stream->GetAttributes().WriteAttributes(DecodedFilename); 320 } 321 catch (std::exception& e) 322 { 323 BOX_WARNING("Failed to restore attributes on " << 324 DecodedFilename << ": " << e.what()); 325 } 318 326 } 319 327 catch(...)
Note: See TracChangeset
for help on using the changeset viewer.
