Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Prowlarr/blame/commit/08e2d60f20936344b25301d5e128e7d54bfbe591/NzbDrone.Core/Instrumentation/DeleteLogFilesService.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
Prowlarr/NzbDrone.Core/Instrumentation/DeleteLogFilesService.cs

38 lines
1.1 KiB

using System.IO;
using NLog;
using NzbDrone.Common;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Instrumentation.Commands;
using NzbDrone.Core.Messaging.Commands;
namespace NzbDrone.Core.Instrumentation
{
public interface IDeleteLogFilesService
{
}
public class DeleteLogFilesService : IDeleteLogFilesService, IExecute<DeleteLogFilesCommand>
{
private readonly IDiskProvider _diskProvider;
private readonly IAppFolderInfo _appFolderInfo;
private readonly Logger _logger;
public DeleteLogFilesService(IDiskProvider diskProvider, IAppFolderInfo appFolderInfo, Logger logger)
{
_diskProvider = diskProvider;
_appFolderInfo = appFolderInfo;
_logger = logger;
}
public void Execute(DeleteLogFilesCommand message)
{
var logFiles = _diskProvider.GetFiles(_appFolderInfo.GetLogFolder(), SearchOption.TopDirectoryOnly);
foreach (var logFile in logFiles)
{
_diskProvider.DeleteFile(logFile);
}
}
}
}