aboutsummaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorThomas Wienecke <wienecke.t@gmail.com>2014-03-14 22:55:14 +0100
committerThiago de Arruda <tpadilha84@gmail.com>2014-03-15 11:50:22 -0300
commit1949acc806e89dc0d2766b2b41eae1cac3186642 (patch)
tree1baad3b84e7ce42b7394e8ccc66670845cc5ccaf /src/ex_cmds.c
parentc83e8b4dc74ba010e0279b67ef8ffa14103d89f6 (diff)
downloadrneovim-1949acc806e89dc0d2766b2b41eae1cac3186642.tar.gz
rneovim-1949acc806e89dc0d2766b2b41eae1cac3186642.tar.bz2
rneovim-1949acc806e89dc0d2766b2b41eae1cac3186642.zip
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.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index c4da8d65e7..73a51fcf06 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2310,7 +2310,7 @@ check_overwrite (
|| (buf->b_flags & BF_READERR))
&& !p_wa
&& !bt_nofile(buf)
- && vim_fexists(ffname)) {
+ && os_file_exists(ffname)) {
if (!eap->forceit && !eap->append) {
#ifdef UNIX
/* with UNIX it is possible to open a directory */
@@ -2336,7 +2336,6 @@ check_overwrite (
if (other && !emsg_silent) {
char_u *dir;
char_u *p;
- int r;
char_u *swapname;
/* We only try the first entry in 'directory', without checking if
@@ -2358,8 +2357,7 @@ check_overwrite (
}
swapname = makeswapname(fname, ffname, curbuf, dir);
vim_free(dir);
- r = vim_fexists(swapname);
- if (r) {
+ if (os_file_exists(swapname)) {
if (p_confirm || cmdmod.confirm) {
char_u buff[DIALOG_MSG_SIZE];