diff options
author | Stefan Hoffmann <stefan991@gmail.com> | 2014-08-08 16:25:33 +0200 |
---|---|---|
committer | Stefan Hoffmann <stefan991@gmail.com> | 2014-08-31 15:15:02 +0200 |
commit | aa378acdf51daf235c7e721cfa646d115d8708f0 (patch) | |
tree | 5c02b8599c0fd40daac18b120e819c73e114bbda /src/nvim/diff.c | |
parent | 3051015f8907445bbb193a0781c75f9cdc54236e (diff) | |
download | rneovim-aa378acdf51daf235c7e721cfa646d115d8708f0.tar.gz rneovim-aa378acdf51daf235c7e721cfa646d115d8708f0.tar.bz2 rneovim-aa378acdf51daf235c7e721cfa646d115d8708f0.zip |
fileinfo: implement os_fileinfo_size
this replaces os_get_file_size and file_info.stat.st_size
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index ab0c80112f..e5fa277671 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -947,9 +947,10 @@ void ex_diffpatch(exarg_T *eap) os_remove((char *)buf); // Only continue if the output file was created. - off_t file_size; - bool file_size_success = os_get_file_size((char *)tmp_new, &file_size); - if (!file_size_success || file_size == 0) { + FileInfo file_info; + bool info_ok = os_get_file_info((char *)tmp_new, &file_info); + off_t filesize = os_fileinfo_size(&file_info); + if (!info_ok || filesize == 0) { EMSG(_("E816: Cannot read patch output")); } else { if (curbuf->b_fname != NULL) { |