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

This commit is contained in:
Andrew Mahone 2019-11-07 08:56:12 -05:00
parent 6defe80b62
commit c09eb34708

View File

@ -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); if (File.Exists(outputPath))
} {
catch (FileNotFoundException) _fileSystem.DeleteFile(outputPath);
{ }
} }
catch (IOException ex) catch (IOException ex)
{ {