aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/shada.c
diff options
context:
space:
mode:
authorMichael Reed <Pyrohh@users.noreply.github.com>2016-01-15 00:27:06 -0500
committerMichael Reed <Pyrohh@users.noreply.github.com>2016-01-15 00:27:06 -0500
commit0b23dec35e46a530b155189f17f6bba6ddc3aebe (patch)
tree07118b6756dfe5c34204112c228bb72b7f83aa11 /src/nvim/shada.c
parent24fbb2c866039d61107fa1f6a2efe86bb6951e55 (diff)
parent07265d221fbd3b4fd16440caab49c70d14370079 (diff)
downloadrneovim-0b23dec35e46a530b155189f17f6bba6ddc3aebe.tar.gz
rneovim-0b23dec35e46a530b155189f17f6bba6ddc3aebe.tar.bz2
rneovim-0b23dec35e46a530b155189f17f6bba6ddc3aebe.zip
Merge pull request #4015 from Pyrohh/os_defs_more
[RFC] Misc. macro cleanup
Diffstat (limited to 'src/nvim/shada.c')
-rw-r--r--src/nvim/shada.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/shada.c b/src/nvim/shada.c
index 59ef2a0d28..f7d71f458d 100644
--- a/src/nvim/shada.c
+++ b/src/nvim/shada.c
@@ -3082,8 +3082,8 @@ shada_write_file_nomerge: {}
// viminfo file that the user can't read.
FileInfo old_info;
if (os_fileinfo((char *)fname, &old_info)) {
- if (getuid() == ROOT_UID) {
- if (old_info.stat.st_uid != ROOT_UID
+ if (getuid() == 0) {
+ if (old_info.stat.st_uid != 0
|| old_info.stat.st_gid != getgid()) {
const uv_uid_t old_uid = (uv_uid_t) old_info.stat.st_uid;
const uv_gid_t old_gid = (uv_gid_t) old_info.stat.st_gid;