diff options
| author | Cody Robibero <cody@robibe.ro> | 2022-04-20 17:37:44 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2022-04-28 09:26:45 -0400 |
| commit | 2e3c5ed3465c412893a80fe23f11a5496a2c6425 (patch) | |
| tree | 9ee664f7dcc3935f29e0fc782a3c362e98b92c56 | |
| parent | 1ed57f48a50f0ff6b9ca924c0e5c6ca7be0053f4 (diff) | |
Merge pull request #7625 from crobibero/xml-cache-delete
(cherry picked from commit ec6f7bdcfffd6d5e05db783226da9cc4ce2df614)
Signed-off-by: crobibero <cody@robibe.ro>
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs index f70e5b089..bd1cd1e1d 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs @@ -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)); |
