aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-12-02 23:31:58 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-12-02 23:31:58 -0500
commit4deb3017c3a881b60f3b26704bfbef683bdec29e (patch)
tree91b3e3d083fac549ebf78b09b38d2e80e25b3aed
parent10f9aaaee4d811578a1dc534adec7a6c1cd5cf1c (diff)
add cache file deletion error handling
-rw-r--r--MediaBrowser.Common.Implementations/Logging/NlogManager.cs2
-rw-r--r--MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs17
-rw-r--r--MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs2
3 files changed, 18 insertions, 3 deletions
diff --git a/MediaBrowser.Common.Implementations/Logging/NlogManager.cs b/MediaBrowser.Common.Implementations/Logging/NlogManager.cs
index 391e7c212..1bbcccd88 100644
--- a/MediaBrowser.Common.Implementations/Logging/NlogManager.cs
+++ b/MediaBrowser.Common.Implementations/Logging/NlogManager.cs
@@ -110,7 +110,7 @@ namespace MediaBrowser.Common.Implementations.Logging
var logFile = new FileTarget
{
FileName = path,
- Layout = "${longdate} ${level} - ${logger}: ${message}"
+ Layout = "${longdate} ${level} ${logger}: ${message}"
};
logFile.Name = "ApplicationLogFile";
diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
index 0e50f9315..c7423a775 100644
--- a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
+++ b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
@@ -128,7 +128,18 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
DeleteEmptyFolders(directory);
if (!_fileSystem.GetFileSystemEntryPaths(directory).Any())
{
- _fileSystem.DeleteDirectory(directory, false);
+ try
+ {
+ _fileSystem.DeleteDirectory(directory, false);
+ }
+ catch (UnauthorizedAccessException ex)
+ {
+ _logger.ErrorException("Error deleting directory {0}", ex, directory);
+ }
+ catch (IOException ex)
+ {
+ _logger.ErrorException("Error deleting directory {0}", ex, directory);
+ }
}
}
}
@@ -139,6 +150,10 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
{
_fileSystem.DeleteFile(path);
}
+ catch (UnauthorizedAccessException ex)
+ {
+ _logger.ErrorException("Error deleting file {0}", ex, path);
+ }
catch (IOException ex)
{
_logger.ErrorException("Error deleting file {0}", ex, path);
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
index d4fa74a86..e796dba76 100644
--- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
+++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
@@ -21,7 +21,7 @@ namespace MediaBrowser.Common.Implementations.Security
public class PluginSecurityManager : ISecurityManager
{
private const string MBValidateUrl = MbAdmin.HttpsUrl + "service/registration/validate";
- private const string AppstoreRegUrl = /*MbAdmin.HttpsUrl*/ "http://mb3admin.com/admin/" + "service/appstore/register";
+ private const string AppstoreRegUrl = /*MbAdmin.HttpsUrl*/ "http://mb3admin.com/admin/service/appstore/register";
/// <summary>
/// The _is MB supporter