[Box Backup-dev] COMMIT r567 - box/trunk/bin/bbackupquery

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Wed May 10 20:24:16 BST 2006


Author: chris
Date: 2006-05-10 19:24:00 +0000 (Wed, 10 May 2006)
New Revision: 567

Modified:
   box/trunk/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Check for d_type not working on this platform, and abort compare


Modified: box/trunk/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/trunk/bin/bbackupquery/BackupQueries.cpp	2006-05-10 09:41:19 UTC (rev 566)
+++ box/trunk/bin/bbackupquery/BackupQueries.cpp	2006-05-10 19:24:00 UTC (rev 567)
@@ -1282,6 +1282,17 @@
 				(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 @@
 			{
 			    // Directory
 			    localDirs.insert(std::string(localDirEn->d_name));
-			}			
+			}
 #else
 			// Entry -- file or dir?
 			if(localDirEn->d_type == DT_REG || localDirEn->d_type == DT_LNK)




More information about the Boxbackup-dev mailing list