|
|
|
@ -20,7 +20,7 @@ namespace Readarr.Api.V1.System.Backup
|
|
|
|
|
private readonly IAppFolderInfo _appFolderInfo;
|
|
|
|
|
private readonly IDiskProvider _diskProvider;
|
|
|
|
|
|
|
|
|
|
private static readonly List<string> ValidExtensions = new List<string> { ".zip", ".db", ".xml" };
|
|
|
|
|
private static readonly List<string> ValidExtensions = new () { ".zip", ".db", ".xml" };
|
|
|
|
|
|
|
|
|
|
public BackupController(IBackupService backupService,
|
|
|
|
|
IAppFolderInfo appFolderInfo,
|
|
|
|
@ -53,6 +53,12 @@ namespace Readarr.Api.V1.System.Backup
|
|
|
|
|
public void DeleteBackup(int id)
|
|
|
|
|
{
|
|
|
|
|
var backup = GetBackup(id);
|
|
|
|
|
|
|
|
|
|
if (backup == null)
|
|
|
|
|
{
|
|
|
|
|
throw new NotFoundException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var path = GetBackupPath(backup);
|
|
|
|
|
|
|
|
|
|
if (!_diskProvider.FileExists(path))
|
|
|
|
|