Revive vim_fname (-> os_file_exists); fix misuse of mch_getperm.

* Move vim_fname from misc1 to os/fs:os_file_exists.
* Add unit tests for os_file_exists.
* Replace misuse of mch_getperm with os_file_exists.
This commit is contained in:
Thomas Wienecke
2014-03-14 22:55:14 +01:00
committed by Thiago de Arruda
parent c83e8b4dc7
commit 1949acc806
14 changed files with 51 additions and 37 deletions

View File

@@ -3063,7 +3063,7 @@ int flags; /* EW_* flags */
*/
for (j = 0, i = 0; i < *num_file; ++i) {
/* Require the files to exist. Helps when using /bin/sh */
if (!(flags & EW_NOTFOUND) && mch_getperm((*file)[i]) < 0)
if (!(flags & EW_NOTFOUND) && !os_file_exists((*file)[i]))
continue;
/* check if this entry should be included */