sapling/eden
Andrey Chursin 0240026f36 vfs: do not follow symlink when overwriting
Summary:
Before this diff VFS::write_regular did not handle correctly use case when file already existed as as symlink - it would write into symlink location, instead of replacing symlink with a regular file (see updated  test_symlink_overwrite that is failing on old implementation)

This diff adds O_NOFOLLOW option on unix when overwriting the file. When destination is a symlink, attempt to write fails with E_LOOP and triggers clear_conflict that removes symlink and allows retry write to succeed.

This also allows one of test cases in checkout that previously did not work

Reviewed By: quark-zju

Differential Revision: D26378893

fbshipit-source-id: 28bcdaba78db283ac7a25bb232c198d3d8f73e5d
2021-02-11 19:10:24 -08:00
..
fs Add annotations to eden/fs/cli/top.py 2021-02-11 16:22:30 -08:00
integration change logging.warn to logging.warning 2021-02-11 02:42:51 -08:00
locale add a copyright header to glibc_en.po 2019-04-26 14:38:27 -07:00
mononoke segmented_changelog: update hash_to_location to gracefully handle unknown hashes 2021-02-11 12:17:35 -08:00
scm vfs: do not follow symlink when overwriting 2021-02-11 19:10:24 -08:00
test_support Manually upgrading eden, and fixing their config 2020-08-06 12:37:04 -07:00
test-data enable treemanifest in snapshots 2019-08-28 18:46:03 -07:00
.gitignore eden: wire up mac contbuild 2019-02-05 21:52:30 -08:00
Eden.project.toml Eden.project.toml file for Nuclide 2018-04-26 11:05:23 -07:00