Selaa lähdekoodia

Check for attachment file before trying to remove it during cleanup.

Andrew Mahone 5 vuotta sitten
vanhempi
sitoutus
c09eb34708

+ 4 - 5
MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs

@@ -220,11 +220,10 @@ namespace MediaBrowser.MediaEncoding.Attachments
                 _logger.LogWarning("Deleting extracted attachment {Path} due to failure: {ExitCode}", outputPath, exitCode);
                 _logger.LogWarning("Deleting extracted attachment {Path} due to failure: {ExitCode}", outputPath, exitCode);
                 try
                 try
                 {
                 {
-                    _fileSystem.DeleteFile(outputPath);
-                }
-                catch (FileNotFoundException)
-                {
-
+                    if (File.Exists(outputPath))
+                    {
+                        _fileSystem.DeleteFile(outputPath);
+                    }
                 }
                 }
                 catch (IOException ex)
                 catch (IOException ex)
                 {
                 {