From cde3d0b44ab2508ff87d519d84977a6802c3396c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 21 Apr 2014 20:11:18 -0700 Subject: [PATCH] Don't throw permissions errors when importing files Fixed: Better error handling when setting permissions after import (mono) --- .../MediaFiles/EpisodeFileMovingService.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs b/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs index 34eac41c4..5e3086835 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs @@ -7,6 +7,7 @@ using NzbDrone.Common; using NzbDrone.Common.Disk; using NzbDrone.Common.EnsureThat; using NzbDrone.Common.EnvironmentInfo; +using NzbDrone.Common.Exceptions; using NzbDrone.Core.Configuration; using NzbDrone.Core.Organizer; using NzbDrone.Core.Parser.Model; @@ -172,15 +173,9 @@ namespace NzbDrone.Core.MediaFiles catch (Exception ex) { - if (ex is UnauthorizedAccessException || ex is InvalidOperationException) - { - _logger.Debug("Unable to apply permissions to: ", path); - _logger.DebugException(ex.Message, ex); - } - else - { - throw; - } + + _logger.WarnException("Unable to apply permissions to: " + path, ex); + _logger.DebugException(ex.Message, ex); } }