Update server/managers/BackupManager.js

This commit is contained in:
advplyr 2023-08-07 17:14:47 -05:00 committed by GitHub
parent 409c5f7b75
commit 43a5296dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ class BackupManager {
return res.status(500).send('Invalid backup file')
}
const tempPath = fileUtils.sanitizeFilename(Path.join(this.BackupPath, backupFile.name))
const tempPath = Path.join(this.BackupPath, fileUtils.sanitizeFilename(backupFile.name))
const success = await backupFile.mv(tempPath).then(() => true).catch((error) => {
Logger.error('[BackupManager] Failed to move backup file', path, error)
return false