From f4198ff39dcc31ad01d4f9f7474d72f2a2f07c92 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 16 Jun 2023 20:24:37 +0200 Subject: [PATCH] Allow specifying a custom backup root --- scripts/Windows/Scripts/Context.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index 6f7252cc..12a64aa0 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -1,7 +1,15 @@ class Context { + [string]$RootDir; [string]$BackupName; [string] BackupRoot() { - return Join-Path $PSScriptRoot ".." ".." ".." "backup" $this.BackupName; + if (-not $this.RootDir) + { + return Join-Path $PSScriptRoot ".." ".." ".." "backup" $this.BackupName; + } + else + { + return $this.RootDir; + } } [string] ArchivePath($name) {