mirror of
https://github.com/neovim/neovim.git
synced 2026-09-03 04:43:48 +00:00
Problem: backupcopy=auto overwrites a file in place when umask is restrictive.
The probe treats permission restore as impossible and writes in
place, keeping the same inode.
Solution: When creating the probe file, open() applies umask, so a 0644
file becomes 0600 with umask 0077. Use fchmod() to fix the
permissions of the probe (Pranav Dwivedi).
closes: vim/vim#21137
fd8aea135d
Co-authored-by: Pranav Dwivedi <dwivedipranav2021@gmail.com>