mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-30 19:56:54 +00:00
Fixed: Update logs won't log an error if there are no update logs
This commit is contained in:
parent
b841d2e9b4
commit
b5607b79bc
1 changed files with 3 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -26,6 +27,8 @@ namespace NzbDrone.Api.Logs
|
|||
|
||||
protected override IEnumerable<String> GetLogFiles()
|
||||
{
|
||||
if (!_diskProvider.FolderExists(_appFolderInfo.GetUpdateLogFolder())) return Enumerable.Empty<String>();
|
||||
|
||||
return _diskProvider.GetFiles(_appFolderInfo.GetUpdateLogFolder(), SearchOption.TopDirectoryOnly)
|
||||
.Where(f => Regex.IsMatch(Path.GetFileName(f), LOGFILE_ROUTE.TrimStart('/'), RegexOptions.IgnoreCase))
|
||||
.ToList();
|
||||
|
|
Loading…
Reference in a new issue