summaryrefslogtreecommitdiff
path: root/bin/bbackupd/BackupClientDirectoryRecord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/bbackupd/BackupClientDirectoryRecord.cpp')
-rw-r--r--bin/bbackupd/BackupClientDirectoryRecord.cpp30
1 files changed, 21 insertions, 9 deletions
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.cpp b/bin/bbackupd/BackupClientDirectoryRecord.cpp
index b8d42d47..e03d53c2 100644
--- a/bin/bbackupd/BackupClientDirectoryRecord.cpp
+++ b/bin/bbackupd/BackupClientDirectoryRecord.cpp
@@ -294,14 +294,21 @@ void BackupClientDirectoryRecord::SyncDirectory(
#else
if(EMU_LSTAT(filename.c_str(), &file_st) != 0)
{
- // Report the error (logs and
- // eventual email to administrator)
- rNotifier.NotifyFileStatFailed(this,
- filename, strerror(errno));
+ if(!(rParams.mrContext.ExcludeDir(
+ filename)))
+ {
+ // Report the error (logs and
+ // eventual email to
+ // administrator)
+ rNotifier.NotifyFileStatFailed(
+ this, filename,
+ strerror(errno));
- // FIXME move to NotifyFileStatFailed()
- SetErrorWhenReadingFilesystemObject(
- rParams, filename.c_str());
+ // FIXME move to
+ // NotifyFileStatFailed()
+ SetErrorWhenReadingFilesystemObject(
+ rParams, filename.c_str());
+ }
// Ignore this entry for now.
continue;
@@ -606,8 +613,10 @@ void BackupClientDirectoryRecord::UpdateAttributes(BackupClientDirectoryRecord::
const StreamableMemBlock &storeAttrEnc(pDirOnStore->GetAttributes());
// Explict decryption
BackupClientFileAttributes storeAttr(storeAttrEnc);
+
// Compare the attributes
- if(attr.Compare(storeAttr, true, true /* ignore both modification times */))
+ if(attr.Compare(storeAttr, true,
+ true /* ignore both modification times */))
{
// No update necessary
updateAttr = false;
@@ -918,7 +927,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
BOX_TRACE("Upload decision: " <<
filename << ": will not upload "
"(modified too recently: "
- "only " << age << "seconds ago)");
+ "only " << age << " seconds ago)");
}
else
{
@@ -1041,6 +1050,9 @@ bool BackupClientDirectoryRecord::UpdateItems(
{
try
{
+ rNotifier.NotifyFileUploadingAttributes(
+ this, filename);
+
// Update store
BackupClientFileAttributes attr;
attr.ReadAttributes(filename.c_str(), false /* put mod times in the attributes, please */);