mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fs: add UV_FS_COPYFILE_FICLONE flag to os_copy
This commit is contained in:
parent
6db1757b53
commit
b4d894c067
@ -2849,7 +2849,7 @@ buf_write (
|
||||
os_remove((char *)backup);
|
||||
|
||||
/* copy the file */
|
||||
if (os_copy((char *)fname, (char *)backup, 0) != 0) {
|
||||
if (os_copy((char *)fname, (char *)backup, UV_FS_COPYFILE_FICLONE) != 0) {
|
||||
SET_ERRMSG(_("E506: Can't write to backup file (add ! to override)"));
|
||||
}
|
||||
|
||||
@ -3452,7 +3452,7 @@ restore_backup:
|
||||
}
|
||||
|
||||
// copy the file.
|
||||
if (os_copy((char *)backup, (char *)fname, 0) == 0) {
|
||||
if (os_copy((char *)backup, (char *)fname, UV_FS_COPYFILE_FICLONE) == 0) {
|
||||
end = 1;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user