Allow specifying a custom backup root

This commit is contained in:
Manuel Thalmann 2023-06-16 20:24:37 +02:00
parent 1c312baa6e
commit ada22de1a8

View file

@ -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) {