diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-11-28 23:05:55 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-11-28 23:05:55 +0000 |
commit | bba577a24244bd5d95044ab4bc23628e48d1ff08 (patch) | |
tree | 48283c53e6f93d1f5ded9797c5344cb243967e22 /src | |
parent | 36c31f71ada48493d099e9510179766cee3c086c (diff) |
updated for version 7.0161v7.0161
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_cmds.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 378fe92b20..b6fab2c14f 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -1804,14 +1804,15 @@ write_viminfo(file, forceit) /* Use mch_open() to be able to use O_NOFOLLOW and set file * protection same as original file, but strip s-bit. */ +#ifdef UNIX fd = mch_open((char *)tempname, O_CREAT|O_EXTRA|O_EXCL|O_WRONLY|O_NOFOLLOW, -#ifdef UNIX - (int)((st_old.st_mode & 0777) | 0600) + (int)((st_old.st_mode & 0777) | 0600)); #else - 0600 /* r&w for user only */ + fd = mch_open((char *)tempname, + O_CREAT|O_EXTRA|O_EXCL|O_WRONLY|O_NOFOLLOW, + 0600); /* r&w for user only */ #endif - ); if (fd < 0) fp_out = NULL; else |