mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
Only delete cache file if exist
This commit is contained in:
parent
d45d228b36
commit
65c47c79da
1 changed files with 6 additions and 1 deletions
|
@ -79,7 +79,12 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
|||
return UnzipIfNeeded(info.Path, cacheFile);
|
||||
}
|
||||
|
||||
File.Delete(cacheFile);
|
||||
// Must check if file exists as parent directory may not exist.
|
||||
if (File.Exists(cacheFile))
|
||||
{
|
||||
File.Delete(cacheFile);
|
||||
}
|
||||
|
||||
_logger.LogInformation("Downloading xmltv listings from {Path}", info.Path);
|
||||
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(cacheFile));
|
||||
|
|
Loading…
Reference in a new issue