fs: add UV_FS_COPYFILE_FICLONE flag to os_copy

This commit is contained in:
Said Al Attrach 2019-03-11 11:55:58 +01:00
parent 6db1757b53
commit b4d894c067
No known key found for this signature in database
GPG Key ID: E528966F5C473A35

View File

@ -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 {