mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Removed try/catch from CreateBackupZip.
Build NzbDrone.Common when debugging now.
This commit is contained in:
parent
8ce6e8a08e
commit
1990f5ab8c
2 changed files with 11 additions and 17 deletions
|
@ -28,26 +28,18 @@ namespace NzbDrone.Core.Providers
|
|||
|
||||
public virtual string CreateBackupZip()
|
||||
{
|
||||
try
|
||||
{
|
||||
var dbFile = _enviromentProvider.GetNzbDronoeDbFile();
|
||||
var configFile = _enviromentProvider.GetConfigPath();
|
||||
var zipFile = _enviromentProvider.GetConfigBackupFile();
|
||||
var dbFile = _enviromentProvider.GetNzbDronoeDbFile();
|
||||
var configFile = _enviromentProvider.GetConfigPath();
|
||||
var zipFile = _enviromentProvider.GetConfigBackupFile();
|
||||
|
||||
using (var zip = new ZipFile())
|
||||
{
|
||||
zip.AddFile(dbFile, String.Empty);
|
||||
zip.AddFile(configFile, String.Empty);
|
||||
zip.Save(zipFile);
|
||||
}
|
||||
|
||||
return zipFile;
|
||||
}
|
||||
catch (Exception ex)
|
||||
using (var zip = new ZipFile())
|
||||
{
|
||||
logger.ErrorException("Failed to create backup zip", ex);
|
||||
throw;
|
||||
zip.AddFile(dbFile, String.Empty);
|
||||
zip.AddFile(configFile, String.Empty);
|
||||
zip.Save(zipFile);
|
||||
}
|
||||
|
||||
return zipFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue