Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs: fix GenerateIndexPages when DirFS or embed.FS is used #1778

Merged
merged 1 commit into from
May 18, 2024

Conversation

efectn
Copy link
Contributor

@efectn efectn commented May 17, 2024

In current implementation of Fasthttp FS, GenerateIndexPages doesn't work properly with DirFS or embed.FS because of fs.ValidPath function.

When you open "" path using with DirFS it returns invalid path error. When using embed.FS, it returns file does not exist error.

So, if the path is "" both cases need to covered properly.

Note: I ain't also sure this is a good solution. Perhaps need smarter solution to cover more edge cases.

@erikdubbelboer erikdubbelboer merged commit aadadb9 into valyala:master May 18, 2024
17 of 19 checks passed
@erikdubbelboer
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants