[Box Backup-commit] COMMIT r1755 - box/chris/merge/lib/backupclient
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Thu, 26 Jul 2007 22:56:06 +0100
Author: chris
Date: 2007-07-26 22:56:06 +0100 (Thu, 26 Jul 2007)
New Revision: 1755
Modified:
box/chris/merge/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.
(refs #3, merges [1659])
Modified: box/chris/merge/lib/backupclient/BackupClientRestore.cpp
===================================================================
--- box/chris/merge/lib/backupclient/BackupClientRestore.cpp 2007-07-26 21:54:32 UTC (rev 1754)
+++ box/chris/merge/lib/backupclient/BackupClientRestore.cpp 2007-07-26 21:56:06 UTC (rev 1755)
@@ -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