0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.0-202

This commit is contained in:
Bram Moolenaar
2007-02-27 15:48:28 +00:00
parent 602eb74de6
commit 311d982b6f
10 changed files with 49 additions and 10 deletions

View File

@@ -1772,7 +1772,8 @@ write_viminfo(file, forceit)
*/
st_old.st_dev = st_old.st_ino = 0;
st_old.st_mode = 0600;
if (mch_stat((char *)fname, &st_old) == 0 && getuid()
if (mch_stat((char *)fname, &st_old) == 0
&& getuid() != ROOT_UID
&& !(st_old.st_uid == getuid()
? (st_old.st_mode & 0200)
: (st_old.st_gid == getgid()