mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
Merge pull request #22056 from lewis6991/refactor/fileio_more
refactor `fileio.c`
This commit is contained in:
commit
f006313e95
1922
src/nvim/fileio.c
1922
src/nvim/fileio.c
File diff suppressed because it is too large
Load Diff
@ -783,6 +783,7 @@ int os_setperm(const char *const name, int perm)
|
||||
# ifdef HAVE_SYS_ACCESS_H
|
||||
# include <sys/access.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Return a pointer to the ACL of file "fname" in allocated memory.
|
||||
// Return NULL if the ACL is not available for whatever reason.
|
||||
@ -806,7 +807,6 @@ void os_free_acl(vim_acl_T aclent)
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef UNIX
|
||||
/// Checks if the current user owns a file.
|
||||
|
@ -13,6 +13,12 @@
|
||||
# include "nvim/os/unix_defs.h"
|
||||
#endif
|
||||
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
# define BACKSLASH_IN_FILENAME_BOOL true
|
||||
#else
|
||||
# define BACKSLASH_IN_FILENAME_BOOL false
|
||||
#endif
|
||||
|
||||
#if !defined(NAME_MAX) && defined(_XOPEN_NAME_MAX)
|
||||
# define NAME_MAX _XOPEN_NAME_MAX
|
||||
#endif
|
||||
|
@ -1339,14 +1339,12 @@ write_error:
|
||||
semsg(_("E829: write error in undo file: %s"), file_name);
|
||||
}
|
||||
|
||||
#ifdef HAVE_ACL
|
||||
if (buf->b_ffname != NULL) {
|
||||
// For systems that support ACL: get the ACL from the original file.
|
||||
vim_acl_T acl = os_get_acl(buf->b_ffname);
|
||||
os_set_acl(file_name, acl);
|
||||
os_free_acl(acl);
|
||||
}
|
||||
#endif
|
||||
|
||||
theend:
|
||||
if (file_name != name) {
|
||||
|
Loading…
Reference in New Issue
Block a user