Skip to content
This repository was archived by the owner on Jun 25, 2022. It is now read-only.
This repository was archived by the owner on Jun 25, 2022. It is now read-only.

packr2: file Readdir returns self #162

@dkumor

Description

@dkumor

The http.File interface requires Readdir, which is used to list a folder in FileServer when index.html is not present.

Currently, packr's file.Readdir which comes from box.Open returns just a single entry, the directory name itself, see: https://github.com/gobuffalo/packd/blob/master/file.go#L41

This means that Readdir does not actually read the directory, making it impossible to use.

I specifically got caught with this trying to copy a packed folder to the filesystem recursively - Readdir was returning the same folder as its own child.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions