Skip to content

fixes possible chmod bug - #337

Merged
Gabriella439 merged 1 commit into
Gabriella439:masterfrom
atpotts:atpotts/fix_chmod
Dec 10, 2018
Merged

fixes possible chmod bug#337
Gabriella439 merged 1 commit into
Gabriella439:masterfrom
atpotts:atpotts/fix_chmod

Conversation

@atpotts

@atpotts atpotts commented Dec 9, 2018

Copy link
Copy Markdown
Contributor

Apologies for such a low value PR, and if I have misunderstood the intentions of any of the functions.

I was trying to use the chmod function recently and noticed that it was failing to change the permissions of any paths.

This seems to be because it is calculating the new permissions and then writing back the old ones. This changes it to write back the new ones, which gives it behaviour closer to what I'd expect from reading the documentation.

The implementation of chmod was calculating the new permissions,
but then setting the permissions back to the old ones. This fixes
this bug.

Similarly, the value returned was the od value rather than the new one.
@Gabriella439

Copy link
Copy Markdown
Owner

No apology necessary! Thank you for fixing this bug 🙂

@Gabriella439
Gabriella439 merged commit b678a50 into Gabriella439:master Dec 10, 2018
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.

2 participants