Unwrapped CreateDirectory and DeleteDirectory

This commit is contained in:
Erwin de Haan
2019-01-26 22:08:04 +01:00
parent 3a831994f6
commit d7c6d16250
58 changed files with 102 additions and 101 deletions

View File

@@ -141,7 +141,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
var parentPath = Path.GetDirectoryName(failHistoryPath);
_fileSystem.CreateDirectory(parentPath);
Directory.CreateDirectory(parentPath);
_fileSystem.WriteAllText(failHistoryPath, string.Join("|", previouslyFailedImages.ToArray()));
}

View File

@@ -151,7 +151,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
_lastExecutionResult = value;
var path = GetHistoryFilePath();
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
Directory.CreateDirectory(Path.GetDirectoryName(path));
lock (_lastExecutionResultSyncLock)
{
@@ -565,7 +565,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
{
var path = GetConfigurationFilePath();
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
Directory.CreateDirectory(Path.GetDirectoryName(path));
JsonSerializer.SerializeToFile(triggers, path);
}

View File

@@ -128,7 +128,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
{
try
{
_fileSystem.DeleteDirectory(directory, false);
Directory.Delete(directory, false);
}
catch (UnauthorizedAccessException ex)
{