mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 21:39:34 +02:00
disk provider removes readonly flag before trying to delete files.
This commit is contained in:
@@ -24,12 +24,15 @@ namespace NzbDrone.Core.RootFolders
|
||||
|
||||
public class RootFolderService : IRootFolderService
|
||||
{
|
||||
private static readonly Logger Logger = NzbDroneLogger.GetLogger();
|
||||
private static readonly Logger Logger = NzbDroneLogger.GetLogger();
|
||||
private readonly IBasicRepository<RootFolder> _rootFolderRepository;
|
||||
private readonly IDiskProvider _diskProvider;
|
||||
private readonly ISeriesRepository _seriesRepository;
|
||||
private readonly IConfigService _configService;
|
||||
|
||||
private static readonly HashSet<string> SpecialFolders = new HashSet<string> { "$recycle.bin", "system volume information", "recycler" };
|
||||
|
||||
|
||||
public RootFolderService(IBasicRepository<RootFolder> rootFolderRepository,
|
||||
IDiskProvider diskProvider,
|
||||
ISeriesRepository seriesRepository,
|
||||
@@ -119,7 +122,7 @@ namespace NzbDrone.Core.RootFolders
|
||||
|
||||
if (Path.GetPathRoot(path).Equals(path, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
var setToRemove = _diskProvider.SpecialFolders;
|
||||
var setToRemove = SpecialFolders;
|
||||
results.RemoveAll(x => setToRemove.Contains(new DirectoryInfo(x.Path.ToLowerInvariant()).Name));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user