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

memfs directory can be read by ReadFile #430

Open
meza opened this issue Aug 19, 2024 · 0 comments
Open

memfs directory can be read by ReadFile #430

meza opened this issue Aug 19, 2024 · 0 comments

Comments

@meza
Copy link

meza commented Aug 19, 2024

When you have a test doing something like this:

	configFile := filepath.Join(t.TempDir(), "config")
	_ = os.Mkdir(configFile, 0755)

and the file under tests does a afero.ReadFile(fs, configPath), the call returns without an error and an empty result instead of failing on the fact that the configPath is a directory.

The same code works as expected on osfs

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

No branches or pull requests

1 participant