[Box Backup-dev] COMMIT r635 - box/chris/general/lib/backupclient

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Thu Jul 6 21:54:58 BST 2006


Author: chris
Date: 2006-07-06 20:54:58 +0000 (Thu, 06 Jul 2006)
New Revision: 635

Modified:
   box/chris/general/lib/backupclient/BackupClientRestore.cpp
Log:
* BackupClientRestore.cpp
- Handle forward slashes in directory names on Win32


Modified: box/chris/general/lib/backupclient/BackupClientRestore.cpp
===================================================================
--- box/chris/general/lib/backupclient/BackupClientRestore.cpp	2006-07-06 20:53:57 UTC (rev 634)
+++ box/chris/general/lib/backupclient/BackupClientRestore.cpp	2006-07-06 20:54:58 UTC (rev 635)
@@ -257,6 +257,14 @@
 	}
 
 	int lastSlash = parentDirectoryName.rfind(DIRECTORY_SEPARATOR_ASCHAR);
+
+	if(lastSlash == std::string::npos)
+	{
+		// might be a forward slash separator, 
+		// especially in the unit tests!
+		lastSlash = parentDirectoryName.rfind('/');
+	}
+
 	if(lastSlash != std::string::npos)
 	{
 		// the target directory is a deep path, remove the last




More information about the Boxbackup-dev mailing list