What's wrong
ImageScanner.ScanForImages (ImageDescriber/ImageScanner.cs:34-43) switched from the SearchOption.AllDirectories overload to an EnumerationOptions instance so that unreadable folders are skipped (c66d467, #162):
EnumerationOptions options = new()
{
RecurseSubdirectories = true,
IgnoreInaccessible = true,
};
EnumerationOptions.AttributesToSkip defaults to FileAttributes.Hidden | FileAttributes.System, whereas the SearchOption overload skips nothing. On Linux and macOS .NET reports every .-prefixed file and directory as Hidden, so they are now excluded along with everything below them. On Windows, anything with the Hidden or System attribute is excluded.
Reproduced with .NET 10 on a tree containing root/.hidden/a.jpg, root/.c.png and root/vis/b.jpg:
- the old
Directory.EnumerateFiles(root, "*", SearchOption.AllDirectories) returns all 3 files
- the current code returns only
vis/b.jpg
Why it matters
ImageDescriber Scan -p ~/Pictures quietly misses images under any dot-folder (e.g. .thumbnails, synced-app folders, .photoslibrary-style bundles) and any dot-named image. Nothing is logged; the "Found N image(s)" count is just lower, so users have no way to notice. The change was a side-effect of the #162 fix, not a deliberate behaviour change.
Suggested fix
Set AttributesToSkip = 0 (or FileAttributes.None) in the options, keeping IgnoreInaccessible = true. If skipping hidden content is actually wanted, make it an explicit, documented choice instead.
Acceptance criteria
What's wrong
ImageScanner.ScanForImages(ImageDescriber/ImageScanner.cs:34-43) switched from theSearchOption.AllDirectoriesoverload to anEnumerationOptionsinstance so that unreadable folders are skipped (c66d467, #162):EnumerationOptions.AttributesToSkipdefaults toFileAttributes.Hidden | FileAttributes.System, whereas theSearchOptionoverload skips nothing. On Linux and macOS .NET reports every.-prefixed file and directory asHidden, so they are now excluded along with everything below them. On Windows, anything with the Hidden or System attribute is excluded.Reproduced with .NET 10 on a tree containing
root/.hidden/a.jpg,root/.c.pngandroot/vis/b.jpg:Directory.EnumerateFiles(root, "*", SearchOption.AllDirectories)returns all 3 filesvis/b.jpgWhy it matters
ImageDescriber Scan -p ~/Picturesquietly misses images under any dot-folder (e.g..thumbnails, synced-app folders,.photoslibrary-style bundles) and any dot-named image. Nothing is logged; the "Found N image(s)" count is just lower, so users have no way to notice. The change was a side-effect of the #162 fix, not a deliberate behaviour change.Suggested fix
Set
AttributesToSkip = 0(orFileAttributes.None) in the options, keepingIgnoreInaccessible = true. If skipping hidden content is actually wanted, make it an explicit, documented choice instead.Acceptance criteria
.-prefixed directory and a.-prefixed image file under the scan root are both returned byScanForImages.ImageScannerTestscovers both cases.