1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-01-02 21:15:05 +00:00

Fixed: Hidden files being ignored

(cherry picked from commit d493f8762fcb1684b44e182753c21d7a493db787)

Closes #4022
This commit is contained in:
Mark McDowall 2023-08-17 21:21:46 -07:00 committed by Bogdan
parent 328459af0b
commit 3e5d780424

View file

@ -176,6 +176,7 @@ public IEnumerable<string> GetFiles(string path, bool recursive)
return _fileSystem.Directory.EnumerateFiles(path, "*", new EnumerationOptions
{
AttributesToSkip = FileAttributes.System,
RecurseSubdirectories = recursive,
IgnoreInaccessible = true
});
@ -517,6 +518,7 @@ public List<IFileInfo> GetFileInfos(string path, bool recursive = false)
return di.EnumerateFiles("*", new EnumerationOptions
{
AttributesToSkip = FileAttributes.System,
RecurseSubdirectories = recursive,
IgnoreInaccessible = true
}).ToList();