sapling/eden/scm/lib/vfs
Andrey Chursin 881b03690d vfs: reset permissions when overwriting file
Summary:
Currently if VFS overwrites executable file with regular, it preserves exec bit[see added test].
This diff makes sure that file has correct permissions after overwrite

This diff also slightly optimizes write_executable, by calling set_mode on the file handle, instead of path

TODO - we can check if calling stats() before set_permissions will save some time

Reviewed By: quark-zju

Differential Revision: D26379824

fbshipit-source-id: 42d0b2fb79ed860ac37b2de077388002ade69449
2021-02-11 19:10:24 -08:00
..
src vfs: reset permissions when overwriting file 2021-02-11 19:10:24 -08:00
Cargo.toml vfs: do not follow symlink when overwriting 2021-02-11 19:10:24 -08:00