Skip to content

The Free Software Media System - Server Backend & API

Catch delete file exceptions

Sergey Veselkov78643b4b2a20
diff --git a/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs b/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs
index 8bace15c65..5d51a901ad 100644
--- a/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs
+++ b/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs
@@ -724,7 +724,14 @@ public sealed class TranscodeManager : ITranscodeManager, IDisposable
foreach (var file in _fileSystem.GetFilePaths(path, true))
{
- _fileSystem.DeleteFile(file);
+ try
+ {
+ _fileSystem.DeleteFile(file);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "Error deleting encoded media cache file {Path}", path);
+ }
}
}