Mercurial > vim
comparison src/session.c @ 20057:407351a89c61 v8.2.0584
patch 8.2.0584: viminfo file uses obsolete function file_readable()
Commit: https://github.com/vim/vim/commit/c5f33db888d14225e5a3851563c9a7fc0b5a5564
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 16 21:04:41 2020 +0200
patch 8.2.0584: viminfo file uses obsolete function file_readable()
Problem: Viminfo file uses obsolete function file_readable().
Solution: Use filereadable(). (closes https://github.com/vim/vim/issues/5934)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 16 Apr 2020 21:15:03 +0200 |
parents | 94eda51ba9ba |
children | 4ed106deb772 |
comparison
equal
deleted
inserted
replaced
20056:f5ab4a61dd78 | 20057:407351a89c61 |
---|---|
896 p_wmh, p_wmw) < 0 || put_eol(fd) == FAIL) | 896 p_wmh, p_wmw) < 0 || put_eol(fd) == FAIL) |
897 return FAIL; | 897 return FAIL; |
898 | 898 |
899 // Lastly, execute the x.vim file if it exists. | 899 // Lastly, execute the x.vim file if it exists. |
900 if (put_line(fd, "let s:sx = expand(\"<sfile>:p:r\").\"x.vim\"") == FAIL | 900 if (put_line(fd, "let s:sx = expand(\"<sfile>:p:r\").\"x.vim\"") == FAIL |
901 || put_line(fd, "if file_readable(s:sx)") == FAIL | 901 || put_line(fd, "if filereadable(s:sx)") == FAIL |
902 || put_line(fd, " exe \"source \" . fnameescape(s:sx)") == FAIL | 902 || put_line(fd, " exe \"source \" . fnameescape(s:sx)") == FAIL |
903 || put_line(fd, "endif") == FAIL) | 903 || put_line(fd, "endif") == FAIL) |
904 return FAIL; | 904 return FAIL; |
905 | 905 |
906 return OK; | 906 return OK; |