summaryrefslogtreecommitdiff
path: root/bin/bbackupquery
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-05-10 19:24:00 +0000
committerChris Wilson <chris+github@qwirx.com>2006-05-10 19:24:00 +0000
commit065bced3bc43cabc046d9ccf6eed1423421484a6 (patch)
treede2c1408e34fb8a6cfa6278b965061f91fb9793c /bin/bbackupquery
parent44bf8bf038c9d0405103e080e962449efc25bd66 (diff)
* BackupQueries.cpp
- Check for d_type not working on this platform, and abort compare
Diffstat (limited to 'bin/bbackupquery')
-rw-r--r--bin/bbackupquery/BackupQueries.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp
index e86bde1e..bf84ab98 100644
--- a/bin/bbackupquery/BackupQueries.cpp
+++ b/bin/bbackupquery/BackupQueries.cpp
@@ -1282,6 +1282,17 @@ void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir, const s
(localDirEn->d_name[1] == '\0' || (localDirEn->d_name[1] == '.' && localDirEn->d_name[2] == '\0')))
{
// ignore, it's . or ..
+
+#ifdef HAVE_VALID_DIRENT_D_TYPE
+ if (localDirEn->d_type != DT_DIR)
+ {
+ fprintf(stderr, "ERROR: d_type does "
+ "not really work on your "
+ "platform. Reconfigure Box!\n");
+ return;
+ }
+#endif
+
continue;
}
@@ -1305,7 +1316,7 @@ void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir, const s
{
// Directory
localDirs.insert(std::string(localDirEn->d_name));
- }
+ }
#else
// Entry -- file or dir?
if(localDirEn->d_type == DT_REG || localDirEn->d_type == DT_LNK)