Skip to content

Commit

Permalink
Remove incorrect constant in chmod (JuliaLang#12)
Browse files Browse the repository at this point in the history
`FILE_TRAVERSE` is the same thing as `FILE_EXECUTE`, and by default, processes do not need `FILE_TRAVERSE` enabled on directories to traverse them [1].

[1] https://docs.microsoft.com/en-us/windows/win32/fileio/file-access-rights-constants
  • Loading branch information
staticfloat committed Jul 22, 2020
1 parent 118bd99 commit 87d3a78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/win/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ static void build_access_struct(EXPLICIT_ACCESS_W* ea, PSID owner,
}

if (mode_triplet & 0x4) {
ea->grfAccessPermissions |= FILE_GENERIC_READ | FILE_TRAVERSE | FILE_WRITE_ATTRIBUTES;
ea->grfAccessPermissions |= FILE_GENERIC_READ | FILE_WRITE_ATTRIBUTES;
}
}

Expand Down

0 comments on commit 87d3a78

Please sign in to comment.