Catch delete file exceptions

This commit is contained in:
Sergey Veselkov 2024-03-16 09:56:06 +03:00
parent e2dac35ef2
commit 78643b4b2a

View File

@ -723,9 +723,16 @@ public sealed class TranscodeManager : ITranscodeManager, IDisposable
} }
foreach (var file in _fileSystem.GetFilePaths(path, true)) foreach (var file in _fileSystem.GetFilePaths(path, true))
{
try
{ {
_fileSystem.DeleteFile(file); _fileSystem.DeleteFile(file);
} }
catch (Exception ex)
{
_logger.LogError(ex, "Error deleting encoded media cache file {Path}", path);
}
}
} }
/// <summary> /// <summary>