Path extensions error are not really user-friendly because they don't indicate which path failed, only the extension (if we're lucky that an extension can be parsed from the file). We should probably indicate the complete path failing so that the user can take action instead of lamenting on the meaninglessness of life :)
Error variants which should have the path:
UnknownFileExtension
InvalidFileExtension
CannotCanonicalizeDirectory/File/IgnorePath/CacheBustedDir
FilePathIsNotUtf8
InvalidUnicodeInDirectoryName/EntryName
Gzip/Zstd
CannotGetMetadata
Apparently GlobError already has the path and an inner std::io::Error so we could use that instead of adding a variant. But it's actually semantically reading either file metadata or folder entries.
It may be clearer to have:
- the path
- the inner
std::io::Error
- an optional operation context (cache bust, ignore paths)
Path extensions error are not really user-friendly because they don't indicate which path failed, only the extension (if we're lucky that an extension can be parsed from the file). We should probably indicate the complete path failing so that the user can take action instead of lamenting on the meaninglessness of life :)
Error variants which should have the path:
UnknownFileExtensionInvalidFileExtensionCannotCanonicalizeDirectory/File/IgnorePath/CacheBustedDirFilePathIsNotUtf8InvalidUnicodeInDirectoryName/EntryNameGzip/ZstdCannotGetMetadataApparently GlobError already has the path and an inner std::io::Error so we could use that instead of adding a variant. But it's actually semantically reading either file metadata or folder entries.
It may be clearer to have:
std::io::Error