Explorar el Código

Catch delete file exceptions

Sergey Veselkov hace 1 año
padre
commit
78643b4b2a
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8 1
      MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs

+ 8 - 1
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);
+            }
         }
     }