diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-08-07 21:39:28 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-08-07 21:39:28 +0200 |
commit | b782ba475a3f8f2b0be99dda164ba4545347f60f (patch) | |
tree | 76e9857ad9334b0df1bf9ed2ba4a612a37ef2dff /src/memline.c | |
parent | b1cf16113f7ab67f42fb6822cecdef74a54fa950 (diff) | |
download | vim-git-b782ba475a3f8f2b0be99dda164ba4545347f60f.tar.gz |
patch 8.1.0251: using full path is not supported for 'backupdir'v8.1.0251
Problem: Using a full path is supported for 'directory' but not for
'backupdir'. (Mikolaj Machowski)
Solution: Support 'backupdir' as well. (Christian Brabandt, closes #179)
Diffstat (limited to 'src/memline.c')
-rw-r--r-- | src/memline.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/memline.c b/src/memline.c index be395fce6..a2f0b4f62 100644 --- a/src/memline.c +++ b/src/memline.c @@ -262,9 +262,6 @@ static int fnamecmp_ino(char_u *, char_u *, long); #endif static void long_to_char(long, char_u *); static long char_to_long(char_u *); -#if defined(UNIX) || defined(WIN3264) -static char_u *make_percent_swname(char_u *dir, char_u *name); -#endif #ifdef FEAT_CRYPT static cryptstate_T *ml_crypt_prepare(memfile_T *mfp, off_T offset, int reading); #endif @@ -2007,18 +2004,18 @@ recover_names( return file_count; } -#if defined(UNIX) || defined(WIN3264) /* Need _very_ long file names */ +#if defined(UNIX) || defined(WIN3264) || defined(PROTO) /* + * Need _very_ long file names. * Append the full path to name with path separators made into percent * signs, to dir. An unnamed buffer is handled as "" (<currentdir>/"") */ - static char_u * + char_u * make_percent_swname(char_u *dir, char_u *name) { - char_u *d, *s, *f; + char_u *d = NULL, *s, *f; - f = fix_fname(name != NULL ? name : (char_u *) ""); - d = NULL; + f = fix_fname(name != NULL ? name : (char_u *)""); if (f != NULL) { s = alloc((unsigned)(STRLEN(f) + 1)); @@ -4070,8 +4067,6 @@ attention_message( } #if defined(FEAT_EVAL) -static int do_swapexists(buf_T *buf, char_u *fname); - /* * Trigger the SwapExists autocommands. * Returns a value for equivalent to do_dialog() (see below): |