From b005cd80cfda591be95146024d9b97eef383500f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 4 Sep 2019 15:54:55 +0200 Subject: patch 8.1.1979: code for handling file names is spread out Problem: Code for handling file names is spread out. Solution: Move code to new filepath.c file. Graduate FEAT_MODIFY_FNAME. --- src/if_cscope.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/if_cscope.c') diff --git a/src/if_cscope.c b/src/if_cscope.c index 8e3a9bfa10..2cc25b7439 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -492,18 +492,15 @@ cs_add_common( char *fname2 = NULL; char *ppath = NULL; int i; -#ifdef FEAT_MODIFY_FNAME int len; int usedlen = 0; char_u *fbuf = NULL; -#endif /* get the filename (arg1), expand it, and try to stat it */ if ((fname = alloc(MAXPATHL + 1)) == NULL) goto add_err; expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL); -#ifdef FEAT_MODIFY_FNAME len = (int)STRLEN(fname); fbuf = (char_u *)fname; (void)modify_fname((char_u *)":p", FALSE, &usedlen, @@ -512,7 +509,7 @@ cs_add_common( goto add_err; fname = (char *)vim_strnsave((char_u *)fname, len); vim_free(fbuf); -#endif + ret = mch_stat(fname, &statbuf); if (ret < 0) { -- cgit v1.2.3