Removed try/catch from CreateBackupZip.

Build NzbDrone.Common when debugging now.
pull/2/head
Mark McDowall 13 years ago
parent 8ce6e8a08e
commit 1990f5ab8c

@ -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();
using (var zip = new ZipFile())
{
zip.AddFile(dbFile, String.Empty);
zip.AddFile(configFile, String.Empty);
zip.Save(zipFile);
}
var dbFile = _enviromentProvider.GetNzbDronoeDbFile();
var configFile = _enviromentProvider.GetConfigPath();
var zipFile = _enviromentProvider.GetConfigBackupFile();
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;
}
}
}

@ -155,6 +155,7 @@ Global
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|x64.ActiveCfg = Debug|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|x86.ActiveCfg = Debug|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|x86.Build.0 = Debug|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|Any CPU.Build.0 = Release|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
@ -167,6 +168,7 @@ Global
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|x64.ActiveCfg = Debug|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|x86.ActiveCfg = Debug|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|x86.Build.0 = Debug|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|Any CPU.Build.0 = Release|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU

Loading…
Cancel
Save