Skip to content

Commit

Permalink
New: Removing update folder from temp folder during housekeeping
Browse files Browse the repository at this point in the history
(cherry picked from commit c1d060ff58fc466f4a2cc232bff07294cf224a9a)
  • Loading branch information
markus101 authored and Qstick committed Jan 6, 2021
1 parent 00e1568 commit 9914f9a
Showing 1 changed file with 25 additions and 0 deletions.
@@ -0,0 +1,25 @@
using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Extensions;

namespace NzbDrone.Core.Housekeeping.Housekeepers
{
public class CleanupTemporaryUpdateFiles : IHousekeepingTask
{
private readonly IDiskProvider _diskProvider;
private readonly IAppFolderInfo _appFolderInfo;

public CleanupTemporaryUpdateFiles(IDiskProvider diskProvider, IAppFolderInfo appFolderInfo)
{
_diskProvider = diskProvider;
_appFolderInfo = appFolderInfo;
}

public void Clean()
{
var updateSandboxFolder = _appFolderInfo.GetUpdateSandboxFolder();

_diskProvider.DeleteFolder(updateSandboxFolder, true);
}
}
}

0 comments on commit 9914f9a

Please sign in to comment.