diff options
| author | Andrew Mahone <andrew.mahone@gmail.com> | 2019-11-07 08:56:12 -0500 |
|---|---|---|
| committer | Andrew Mahone <andrew.mahone@gmail.com> | 2019-11-07 08:56:12 -0500 |
| commit | c09eb3470815c8f868fd6eda6b542169d29f2098 (patch) | |
| tree | 7cc0fc88c412fa79bbed1d1eb971c45732e3819d | |
| parent | 6defe80b62483350111dc6ba2f18cfd83542c4b1 (diff) | |
Check for attachment file before trying to remove it during cleanup.
| -rw-r--r-- | MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs b/MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs index bda5c2f37..501dd3fed 100644 --- a/MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs +++ b/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); try { - _fileSystem.DeleteFile(outputPath); - } - catch (FileNotFoundException) - { - + if (File.Exists(outputPath)) + { + _fileSystem.DeleteFile(outputPath); + } } catch (IOException ex) { |
