Allow specifying a custom backup root

This commit is contained in:
Manuel Thalmann 2023-06-16 20:24:37 +02:00
parent ac288a913d
commit f4198ff39d

View file

@ -1,7 +1,15 @@
class Context { class Context {
[string]$RootDir;
[string]$BackupName; [string]$BackupName;
[string] BackupRoot() { [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) { [string] ArchivePath($name) {