summaryrefslogtreecommitdiff
path: root/lib/backupclient
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-02-09 22:51:04 +0000
committerChris Wilson <chris+github@qwirx.com>2007-02-09 22:51:04 +0000
commit9341f476c713f44d471083b7f67e31dcd93eb1dd (patch)
tree2c6fcfa4500669dd5538dc7264ee72bd42ed02dc /lib/backupclient
parent270bdff4312add7816e095d06adf7b58f13fb28b (diff)
Don't throw an exception if we fail to delete a file in the way of restore,
just log the error and return an error code (refs #3)
Diffstat (limited to 'lib/backupclient')
-rw-r--r--lib/backupclient/BackupClientRestore.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/backupclient/BackupClientRestore.cpp b/lib/backupclient/BackupClientRestore.cpp
index baf33002..194c50ad 100644
--- a/lib/backupclient/BackupClientRestore.cpp
+++ b/lib/backupclient/BackupClientRestore.cpp
@@ -263,7 +263,11 @@ static int BackupClientRestoreDir(BackupProtocolClient &rConnection, int64_t Dir
::printf("WARNING: File present with name '%s', removing out of the way of restored directory. Use specific restore with ID to restore this object.", rLocalDirectoryName.c_str());
if(::unlink(rLocalDirectoryName.c_str()) != 0)
{
- THROW_EXCEPTION(CommonException, OSFileError);
+ ::syslog(LOG_ERR, "Failed to delete "
+ "directory %s: %s",
+ rLocalDirectoryName.c_str(),
+ strerror(errno));
+ return Restore_UnknownError;
}
TRACE1("In restore, directory name collision with file %s", rLocalDirectoryName.c_str());
}