PowerShellGSM icon indicating copy to clipboard operation
PowerShellGSM copied to clipboard

Temp backup folder causing issue on some restarts.

Open jakman76 opened this issue 1 year ago • 0 comments

stated to use the PS a little bit ago - excellent work!

I was running into an issue with the temp-backup folder already existing error. Seems like the last backup was not correctly deleting the folder. This will exit the startup with error. (error: folder already exist in line 79 of Backup-Server.psm1. Maybe the compressor had a lock on the folder when the remove command was executed? I fixed the problem by adding another remove folder (new line 79) before creating it again: This works 100% now.

78: # Create a temporary directory 79: Remove-Item -Path "$($Backups.Path)$Type$((Get-Item $Backups.Saves).Name)" -Force -Recurse 80: $TempDirectory = New-Item -ItemType Directory -Path "$($Backups.Path)$Type$((Get-Item $Backups.Saves).Name)"

jakman76 avatar Apr 09 '24 18:04 jakman76