Skip to content

readDir not guardable (can fail even when fileExists succeeds) #11917

@cmahnke

Description

@cmahnke

What version of Hugo are you using (hugo version)?

hugo v0.121.2-6d5b44305eaa9d0a157946492a6f319da38de154+extended darwin/arm64 BuildDate=2024-01-05T12:21:15Z VendorInfo=brew

Does this issue reproduce with the latest release?

Yes

Description

fileExists and os.Stat report a file as existing but readDir fails, maybe the virtual filesystem doesn't apply to readDir?

I haven't test with mounts, but my expectation that either none should work or all.

See https://github.com/cmahnke/hugo-test
The template is in layouts/partials/dir-check.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions