summaryrefslogtreecommitdiff
path: root/lib/backupstore
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-02-27 23:36:22 +0000
committerChris Wilson <chris+github@qwirx.com>2014-02-27 23:36:22 +0000
commit1f2e8fe5280db96b0b56e226618f817b744176cb (patch)
tree80753974f22b917822a5fc7b2c46dcacb35f04a2 /lib/backupstore
parent455e1fe0806be81474aeb867ac07993d1f949006 (diff)
Don't throw a wobbly while backing up if files don't exist.
Reading extended attributes may fail with an error if the file was removed (race condition) or in tests when generating random nonexistent directory entries. Handle this more gracefully by not backing up the extended attributes instead of dying completely.
Diffstat (limited to 'lib/backupstore')
-rw-r--r--lib/backupstore/BackupClientFileAttributes.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/backupstore/BackupClientFileAttributes.cpp b/lib/backupstore/BackupClientFileAttributes.cpp
index d76432ba..53215b7c 100644
--- a/lib/backupstore/BackupClientFileAttributes.cpp
+++ b/lib/backupstore/BackupClientFileAttributes.cpp
@@ -664,12 +664,17 @@ void BackupClientFileAttributes::FillExtendedAttr(StreamableMemBlock &outputBloc
"attributes of '" << Filename << "': "
"buffer too small, not backed up");
}
+ else if(errno == ENOENT)
+ {
+ BOX_ERROR("Failed to list extended "
+ "attributes of '" << Filename << "': "
+ "file no longer exists");
+ }
else
{
- BOX_LOG_SYS_ERROR("Failed to list extended "
- "attributes of '" << Filename << "', "
- "not backed up");
- THROW_EXCEPTION(CommonException, OSFileError);
+ THROW_SYS_FILE_ERROR("Failed to list extended "
+ "attributes, skipping them", Filename,
+ CommonException, OSFileError);
}
}
}