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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent MemMapFs.Chmod from changing all mode bits #249

merged 3 commits into from Jul 13, 2020


Copy link

I ran into an issue where my program called fs.Chmod and it changed from a directory to a regular file. This one had me stumped for weeks 馃槄

After checking os.Chmod's docs, I bit-masked the part Chmod is permitted to set, then OR'd it with the file's other previous mode bits. I also added a test to check the file type after setting all permission bits to 0.

@0xmichalis 0xmichalis merged commit 5d9e780 into spf13:master Jul 13, 2020
3 checks passed
Copy link

Good catch @JohnStarich, I have released v1.3.2

@JohnStarich JohnStarich deleted the bugfix/memfs-chmod-perm-only branch July 14, 2020 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants