diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-07-17 11:23:36 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-07-17 11:23:36 -0300 |
commit | b92630c2fff7950141630f0d62b11404d0589ece (patch) | |
tree | a726403fd4e6941872b1e6bbbefe430260feb875 /src/nvim/fileio.c | |
parent | e057676a89fb692f2569d7e586ea26d323428de4 (diff) | |
parent | 974408f2de8531f58e3f1cde3db7344d7b23dfd0 (diff) | |
download | rneovim-b92630c2fff7950141630f0d62b11404d0589ece.tar.gz rneovim-b92630c2fff7950141630f0d62b11404d0589ece.tar.bz2 rneovim-b92630c2fff7950141630f0d62b11404d0589ece.zip |
Merge pull request #964 '[RFC] Fix #963'
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 9b5df80a0c..fad8bd9581 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -4616,7 +4616,7 @@ int vim_rename(char_u *from, char_u *to) acl = mch_get_acl(from); #endif fd_in = os_open((char *)from, O_RDONLY, 0); - if (fd_in == -1) { + if (fd_in < 0) { #ifdef HAVE_ACL mch_free_acl(acl); #endif @@ -4626,7 +4626,7 @@ int vim_rename(char_u *from, char_u *to) /* Create the new file with same permissions as the original. */ fd_out = os_open((char *)to, O_CREAT|O_EXCL|O_WRONLY|O_NOFOLLOW, (int)perm); - if (fd_out == -1) { + if (fd_out < 0) { close(fd_in); #ifdef HAVE_ACL mch_free_acl(acl); |