From 18b71f8cbbdf85907a9e204b9e9f2d056ac43419 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 26 Jul 2007 21:56:06 +0000 Subject: 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]) --- lib/backupclient/BackupClientRestore.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/backupclient/BackupClientRestore.cpp') 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 -- cgit v1.2.3