[Box Backup-commit] COMMIT r1660 - box/chris/general/lib/backupclient

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Tue May 15 22:06:51 BST 2007


Author: chris
Date: 2007-05-15 22:06:51 +0100 (Tue, 15 May 2007)
New Revision: 1660

Modified:
   box/chris/general/lib/backupclient/BackupClientRestore.cpp
Log:
Experimental fix for restore problem reported by Mikael Syska:

query > restore Admin "c:\admin\"
Failed to read file information: The parameter is incorrect. (87)
Failed to get file information for 'c:'
Failed to check existence for c:: Common OSFileError (Error accessing a
file. Check permissions.)
ERROR: Unknown restore result.


Modified: box/chris/general/lib/backupclient/BackupClientRestore.cpp
===================================================================
--- box/chris/general/lib/backupclient/BackupClientRestore.cpp	2007-05-15 20:58:42 UTC (rev 1659)
+++ box/chris/general/lib/backupclient/BackupClientRestore.cpp	2007-05-15 21:06:51 UTC (rev 1660)
@@ -304,6 +304,15 @@
 		// exists, otherwise the restore should fail.
 		parentDirectoryName.resize(lastSlash);
 
+		#ifdef WIN32
+			// if the path is a drive letter, then we need to
+			// add a a backslash to query the root directory.
+			if (lastSlash == 2 && parentDirectoryName[1] == ':')
+			{
+				parentDirectoryName += '\\';
+			}
+		#endif
+
 		int parentExists;
 
 		try




More information about the Boxbackup-commit mailing list