[Box Backup-commit] COMMIT r1021 - box/chris/general/bin/bbackupd
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sat, 14 Oct 2006 15:05:31 +0100
Author: chris
Date: 2006-10-14 15:05:31 +0100 (Sat, 14 Oct 2006)
New Revision: 1021
Modified:
box/chris/general/bin/bbackupd/BackupClientDirectoryRecord.cpp
Log:
* Improved comments
* Log unknown file types as unreadable files
Modified: box/chris/general/bin/bbackupd/BackupClientDirectoryRecord.cpp
===================================================================
--- box/chris/general/bin/bbackupd/BackupClientDirectoryRecord.cpp 2006-10-14 13:51:29 UTC (rev 1020)
+++ box/chris/general/bin/bbackupd/BackupClientDirectoryRecord.cpp 2006-10-14 14:05:31 UTC (rev 1021)
@@ -237,6 +237,15 @@
filename = MakeFullPath(rLocalPath, en->d_name);
#ifdef WIN32
+ // Don't stat the file just yet, to ensure
+ // that users can exclude unreadable files
+ // to suppress warnings that they are
+ // not accessible.
+ //
+ // Our emulated readdir() abuses en->d_type,
+ // which would normally contain DT_REG,
+ // DT_DIR, etc, but we only use it here and
+ // prefer S_IFREG, S_IFDIR...
int type = en->d_type;
#else
if(::lstat(filename.c_str(), &st) != 0)
@@ -288,6 +297,8 @@
"%d (%s)", type,
filename.c_str());
#endif
+ SetErrorWhenReadingFilesystemObject(
+ rParams, filename.c_str());
continue;
}
@@ -295,6 +306,8 @@
// So make the information for adding to the checksum
#ifdef WIN32
+ // We didn't stat the file before,
+ // but now we need the information.
if(::lstat(filename.c_str(), &st) != 0)
{
// Report the error (logs and