diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-01-11 23:01:30 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-01-11 23:01:30 +0000 |
commit | ecd8635aecde4841daaa447cddcc395894859774 (patch) | |
tree | 2c61a5c0394e9be3a4eef734ae2128879a8c7b21 /bin/bbackupd/BackupClientDirectoryRecord.cpp | |
parent | 4201fdff12c3aea7d65b17ee2a0319c81fc41799 (diff) |
Added logging of directory scans and excluded files. (refs #3)
Diffstat (limited to 'bin/bbackupd/BackupClientDirectoryRecord.cpp')
-rw-r--r-- | bin/bbackupd/BackupClientDirectoryRecord.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.cpp b/bin/bbackupd/BackupClientDirectoryRecord.cpp index 6651598a..b9780fed 100644 --- a/bin/bbackupd/BackupClientDirectoryRecord.cpp +++ b/bin/bbackupd/BackupClientDirectoryRecord.cpp @@ -199,6 +199,9 @@ void BackupClientDirectoryRecord::SyncDirectory(BackupClientDirectoryRecord::Syn DIR *dirHandle = 0; try { + rParams.GetProgressNotifier().NotifyScanDirectory( + this, rLocalPath); + dirHandle = ::opendir(rLocalPath.c_str()); if(dirHandle == 0) { @@ -288,6 +291,11 @@ void BackupClientDirectoryRecord::SyncDirectory(BackupClientDirectoryRecord::Syn // Exclude it? if(rParams.mrContext.ExcludeFile(filename)) { + rParams.GetProgressNotifier() + .NotifyFileExcluded( + this, + filename); + // Next item! continue; } @@ -302,6 +310,11 @@ void BackupClientDirectoryRecord::SyncDirectory(BackupClientDirectoryRecord::Syn // Exclude it? if(rParams.mrContext.ExcludeDir(filename)) { + rParams.GetProgressNotifier() + .NotifyDirExcluded( + this, + filename); + // Next item! continue; } @@ -316,6 +329,9 @@ void BackupClientDirectoryRecord::SyncDirectory(BackupClientDirectoryRecord::Syn "%d (%s)", type, filename.c_str()); #endif + rParams.GetProgressNotifier() + .NotifyUnsupportedFileType( + this, filename); SetErrorWhenReadingFilesystemObject( rParams, filename.c_str()); continue; @@ -329,6 +345,11 @@ void BackupClientDirectoryRecord::SyncDirectory(BackupClientDirectoryRecord::Syn // but now we need the information. if(::lstat(filename.c_str(), &st) != 0) { + rParams.GetProgressNotifier() + .NotifyFileStatFailed(this, + filename, + strerror(errno)); + // Report the error (logs and // eventual email to administrator) SetErrorWhenReadingFilesystemObject( |