diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-16 17:03:45 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-16 17:03:45 +0100 |
commit | cd142e3369db8888163a511dbe9907bcd138829c (patch) | |
tree | da7a202c6d0d9c3074d285e229133855e7d8c298 /src/proto/os_unix.pro | |
parent | a42ad57e481d6ed9c34c80c99bd0512d4660515b (diff) | |
download | vim-git-cd142e3369db8888163a511dbe9907bcd138829c.tar.gz |
patch 8.0.1300: file permissions may end up wrong when writingv8.0.1300
Problem: File permissions may end up wrong when writing.
Solution: Use fchmod() instead of chmod() when possible. Don't truncate
until we know we can change the file.
Diffstat (limited to 'src/proto/os_unix.pro')
-rw-r--r-- | src/proto/os_unix.pro | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/proto/os_unix.pro b/src/proto/os_unix.pro index bdbe17f77..d3a00b5a2 100644 --- a/src/proto/os_unix.pro +++ b/src/proto/os_unix.pro @@ -36,6 +36,7 @@ int mch_isFullName(char_u *fname); void fname_case(char_u *name, int len); long mch_getperm(char_u *name); int mch_setperm(char_u *name, long perm); +int mch_fsetperm(int fd, long perm); void mch_copy_sec(char_u *from_file, char_u *to_file); vim_acl_T mch_get_acl(char_u *fname); void mch_set_acl(char_u *fname, vim_acl_T aclent); |