Closed dkumor closed 5 years ago
PRs are welcome.
Mark Bates On Feb 16, 2019, 8:34 AM -0500, Daniel Kumor notifications@github.com, wrote:
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. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
The
http.File
interface requiresReaddir
, which is used to list a folder inFileServer
whenindex.html
is not present.Currently, packr's
file.Readdir
which comes frombox.Open
returns just a single entry, the directory name itself, see: https://github.com/gobuffalo/packd/blob/master/file.go#L41This 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.