From 817e67c3541c804d3ebeafd515eea3d59c6977b1 Mon Sep 17 00:00:00 2001 From: tree3887 Date: Fri, 7 May 2021 21:47:59 -0500 Subject: [PATCH] Update backup.ps1 (#36) Adds double quotes around each path and removes a trailing backslash from them as well. I have found through experimentation that restic does not like a backslash followed by a double quote. The backslash appears to be an escape character. Surrounding the path with double quotes allows paths with spaces to be used. --- backup.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.ps1 b/backup.ps1 index b98dc2e..e215094 100644 --- a/backup.ps1 +++ b/backup.ps1 @@ -140,7 +140,7 @@ function Invoke-Backup { # Build the new list of folders from settings (if there are any) $folder_list = New-Object System.Collections.Generic.List[System.Object] ForEach ($path in $item.Value) { - $p = Join-Path $root_path $path + $p = '"{0}"' -f ((Join-Path $root_path $path) -replace "\\$", "") $folder_list.Add($p) }