Check for attachment file before trying to remove it during cleanup.
This commit is contained in:
parent
6defe80b62
commit
c09eb34708
|
@ -219,12 +219,11 @@ 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
|
||||||
|
{
|
||||||
|
if (File.Exists(outputPath))
|
||||||
{
|
{
|
||||||
_fileSystem.DeleteFile(outputPath);
|
_fileSystem.DeleteFile(outputPath);
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (IOException ex)
|
catch (IOException ex)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user