mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-21 21:20:39 +02:00
add cache file deletion error handling
This commit is contained in:
parent
10f9aaaee4
commit
4deb3017c3
|
@ -110,7 +110,7 @@ namespace MediaBrowser.Common.Implementations.Logging
|
||||||
var logFile = new FileTarget
|
var logFile = new FileTarget
|
||||||
{
|
{
|
||||||
FileName = path,
|
FileName = path,
|
||||||
Layout = "${longdate} ${level} - ${logger}: ${message}"
|
Layout = "${longdate} ${level} ${logger}: ${message}"
|
||||||
};
|
};
|
||||||
|
|
||||||
logFile.Name = "ApplicationLogFile";
|
logFile.Name = "ApplicationLogFile";
|
||||||
|
|
|
@ -128,7 +128,18 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
|
||||||
DeleteEmptyFolders(directory);
|
DeleteEmptyFolders(directory);
|
||||||
if (!_fileSystem.GetFileSystemEntryPaths(directory).Any())
|
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);
|
_fileSystem.DeleteFile(path);
|
||||||
}
|
}
|
||||||
|
catch (UnauthorizedAccessException ex)
|
||||||
|
{
|
||||||
|
_logger.ErrorException("Error deleting file {0}", ex, path);
|
||||||
|
}
|
||||||
catch (IOException ex)
|
catch (IOException ex)
|
||||||
{
|
{
|
||||||
_logger.ErrorException("Error deleting file {0}", ex, path);
|
_logger.ErrorException("Error deleting file {0}", ex, path);
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace MediaBrowser.Common.Implementations.Security
|
||||||
public class PluginSecurityManager : ISecurityManager
|
public class PluginSecurityManager : ISecurityManager
|
||||||
{
|
{
|
||||||
private const string MBValidateUrl = MbAdmin.HttpsUrl + "service/registration/validate";
|
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>
|
/// <summary>
|
||||||
/// The _is MB supporter
|
/// The _is MB supporter
|
||||||
|
|
Loading…
Reference in a new issue