summaryrefslogtreecommitdiff
path: root/lib/backupclient/BackupClientRestore.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-07-26 21:56:06 +0000
committerChris Wilson <chris+github@qwirx.com>2007-07-26 21:56:06 +0000
commit18b71f8cbbdf85907a9e204b9e9f2d056ac43419 (patch)
treeffb9b4ed7ac229928fff47c7246088e6d8b9104f /lib/backupclient/BackupClientRestore.cpp
parent26d8ac70f566a4a43579929cd96174618b3b9949 (diff)
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])
Diffstat (limited to 'lib/backupclient/BackupClientRestore.cpp')
-rw-r--r--lib/backupclient/BackupClientRestore.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/backupclient/BackupClientRestore.cpp b/lib/backupclient/BackupClientRestore.cpp
index 834bfb9a..028c1659 100644
--- a/lib/backupclient/BackupClientRestore.cpp
+++ b/lib/backupclient/BackupClientRestore.cpp
@@ -304,6 +304,15 @@ static int BackupClientRestoreDir(BackupProtocolClient &rConnection, int64_t Dir
// 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