New: Ignore inaccessible files with getting files

(cherry picked from commit e5aa8584100d96a2077c57f74ae5b2ceab63de19)
This commit is contained in:
Mark McDowall
2023-08-03 19:54:44 -07:00
committed by Bogdan
parent 1100f350ae
commit 141f1597dc
14 changed files with 47 additions and 41 deletions

View File

@@ -159,7 +159,7 @@ namespace NzbDrone.Common.EnvironmentInfo
private void CleanupSqLiteRollbackFiles()
{
_diskProvider.GetFiles(_appFolderInfo.AppDataFolder, SearchOption.TopDirectoryOnly)
_diskProvider.GetFiles(_appFolderInfo.AppDataFolder, false)
.Where(f => Path.GetFileName(f).StartsWith("nzbdrone.db"))
.ToList()
.ForEach(_diskProvider.DeleteFile);