From 125f46fbec3d79c9b217c9f797806ff86bf4c71f Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Tue, 10 Jan 2017 13:21:54 -0500 Subject: [PATCH] Fixes #104 - Backup/update fail Access to the path "/tmp/nzbdrone_backup/config.xml" is denied --- src/NzbDrone.Api/Frontend/Mappers/BackupFileMapper.cs | 2 +- src/NzbDrone.Core/Backup/BackupService.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Api/Frontend/Mappers/BackupFileMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/BackupFileMapper.cs index 9e4912524..8e8393ef6 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/BackupFileMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/BackupFileMapper.cs @@ -25,7 +25,7 @@ namespace NzbDrone.Api.Frontend.Mappers public override bool CanHandle(string resourceUrl) { - return resourceUrl.StartsWith("/backup/") && resourceUrl.ContainsIgnoreCase("nzbdrone_backup_") && resourceUrl.EndsWith(".zip"); + return resourceUrl.StartsWith("/backup/") && resourceUrl.ContainsIgnoreCase("radarr_backup_") && resourceUrl.EndsWith(".zip"); } } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Backup/BackupService.cs b/src/NzbDrone.Core/Backup/BackupService.cs index 8cc89d87b..39130703f 100644 --- a/src/NzbDrone.Core/Backup/BackupService.cs +++ b/src/NzbDrone.Core/Backup/BackupService.cs @@ -33,7 +33,7 @@ namespace NzbDrone.Core.Backup private string _backupTempFolder; - private static readonly Regex BackupFileRegex = new Regex(@"nzbdrone_backup_[._0-9]+\.zip", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly Regex BackupFileRegex = new Regex(@"radarr_backup_[._0-9]+\.zip", RegexOptions.Compiled | RegexOptions.IgnoreCase); public BackupService(IMainDatabase maindDb, IDiskTransferService diskTransferService, @@ -49,7 +49,7 @@ namespace NzbDrone.Core.Backup _archiveService = archiveService; _logger = logger; - _backupTempFolder = Path.Combine(_appFolderInfo.TempFolder, "nzbdrone_backup"); + _backupTempFolder = Path.Combine(_appFolderInfo.TempFolder, "radarr_backup"); } public void Backup(BackupType backupType) @@ -59,7 +59,7 @@ namespace NzbDrone.Core.Backup _diskProvider.EnsureFolder(_backupTempFolder); _diskProvider.EnsureFolder(GetBackupFolder(backupType)); - var backupFilename = string.Format("nzbdrone_backup_{0:yyyy.MM.dd_HH.mm.ss}.zip", DateTime.Now); + var backupFilename = string.Format("radarr_backup_{0:yyyy.MM.dd_HH.mm.ss}.zip", DateTime.Now); var backupPath = Path.Combine(GetBackupFolder(backupType), backupFilename); Cleanup();