diff --git a/VServerSetup.ps1 b/VServerSetup.ps1 index 61400d2..35a63cb 100644 --- a/VServerSetup.ps1 +++ b/VServerSetup.ps1 @@ -358,9 +358,13 @@ if ($jdPath) { Write-Host " Importiere JD2-Backup..." -ForegroundColor Cyan Write-Host " Ziel: $jdPath" -ForegroundColor Gray # Backup zuerst lokal suchen, dann von Gitea laden - $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path - $backupZip = Join-Path $scriptDir "jdownloader-backup.zip" - if (-not (Test-Path $backupZip)) { + $backupZip = $null + $scriptPath = $MyInvocation.MyCommand.Path + if ($scriptPath) { + $localZip = Join-Path (Split-Path -Parent $scriptPath) "jdownloader-backup.zip" + if (Test-Path $localZip) { $backupZip = $localZip } + } + if (-not $backupZip) { Write-Host " Lade Backup von Gitea..." -ForegroundColor Gray $backupZip = "$tempDir\jdownloader-backup.zip" try {