0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

updated for version 7.0059

This commit is contained in:
Bram Moolenaar
2005-03-11 22:46:48 +00:00
parent df7b1ffe99
commit cd71fa3c1e
9 changed files with 104 additions and 106 deletions

View File

@@ -5675,6 +5675,9 @@ vim_rename(from, to)
#endif
struct stat st;
long perm;
#ifdef HAVE_ACL
vim_acl_T acl; /* ACL from original file */
#endif
/*
* When the names are identical, there is nothing to do.
@@ -5726,6 +5729,10 @@ vim_rename(from, to)
* Rename() failed, try copying the file.
*/
perm = mch_getperm(from);
#ifdef HAVE_ACL
/* For systems that support ACL: get the ACL from the original file. */
acl = mch_get_acl(from);
#endif
fd_in = mch_open((char *)from, O_RDONLY|O_EXTRA, 0);
if (fd_in == -1)
return -1;
@@ -5763,6 +5770,9 @@ vim_rename(from, to)
to = from;
}
mch_setperm(to, perm);
#ifdef HAVE_ACL
mch_set_acl(to, acl);
#endif
if (errmsg != NULL)
{
EMSG2(errmsg, to);