summaryrefslogtreecommitdiff
path: root/lib/backupclient/BackupClientRestore.cpp
diff options
context:
space:
mode:
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