comparison src/memline.c @ 14475:dddba3937532 v8.1.0251

patch 8.1.0251: using full path is not supported for 'backupdir' commit https://github.com/vim/vim/commit/b782ba475a3f8f2b0be99dda164ba4545347f60f Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 7 21:39:28 2018 +0200 patch 8.1.0251: using full path is not supported for 'backupdir' Problem: Using a full path is supported for 'directory' but not for 'backupdir'. (Mikolaj Machowski) Solution: Support 'backupdir' as well. (Christian Brabandt, closes #179)
author Christian Brabandt <cb@256bit.org>
date Tue, 07 Aug 2018 21:45:05 +0200
parents 8631b54ae2a2
children 23d6d9e9ae3e
comparison
equal deleted inserted replaced
14474:6325f850efcf 14475:dddba3937532
260 #ifdef CHECK_INODE 260 #ifdef CHECK_INODE
261 static int fnamecmp_ino(char_u *, char_u *, long); 261 static int fnamecmp_ino(char_u *, char_u *, long);
262 #endif 262 #endif
263 static void long_to_char(long, char_u *); 263 static void long_to_char(long, char_u *);
264 static long char_to_long(char_u *); 264 static long char_to_long(char_u *);
265 #if defined(UNIX) || defined(WIN3264)
266 static char_u *make_percent_swname(char_u *dir, char_u *name);
267 #endif
268 #ifdef FEAT_CRYPT 265 #ifdef FEAT_CRYPT
269 static cryptstate_T *ml_crypt_prepare(memfile_T *mfp, off_T offset, int reading); 266 static cryptstate_T *ml_crypt_prepare(memfile_T *mfp, off_T offset, int reading);
270 #endif 267 #endif
271 #ifdef FEAT_BYTEOFF 268 #ifdef FEAT_BYTEOFF
272 static void ml_updatechunk(buf_T *buf, long line, long len, int updtype); 269 static void ml_updatechunk(buf_T *buf, long line, long len, int updtype);
2005 } 2002 }
2006 vim_free(dir_name); 2003 vim_free(dir_name);
2007 return file_count; 2004 return file_count;
2008 } 2005 }
2009 2006
2010 #if defined(UNIX) || defined(WIN3264) /* Need _very_ long file names */ 2007 #if defined(UNIX) || defined(WIN3264) || defined(PROTO)
2011 /* 2008 /*
2009 * Need _very_ long file names.
2012 * Append the full path to name with path separators made into percent 2010 * Append the full path to name with path separators made into percent
2013 * signs, to dir. An unnamed buffer is handled as "" (<currentdir>/"") 2011 * signs, to dir. An unnamed buffer is handled as "" (<currentdir>/"")
2014 */ 2012 */
2015 static char_u * 2013 char_u *
2016 make_percent_swname(char_u *dir, char_u *name) 2014 make_percent_swname(char_u *dir, char_u *name)
2017 { 2015 {
2018 char_u *d, *s, *f; 2016 char_u *d = NULL, *s, *f;
2019 2017
2020 f = fix_fname(name != NULL ? name : (char_u *) ""); 2018 f = fix_fname(name != NULL ? name : (char_u *)"");
2021 d = NULL;
2022 if (f != NULL) 2019 if (f != NULL)
2023 { 2020 {
2024 s = alloc((unsigned)(STRLEN(f) + 1)); 2021 s = alloc((unsigned)(STRLEN(f) + 1));
2025 if (s != NULL) 2022 if (s != NULL)
2026 { 2023 {
4068 cmdline_row = msg_row; 4065 cmdline_row = msg_row;
4069 --no_wait_return; 4066 --no_wait_return;
4070 } 4067 }
4071 4068
4072 #if defined(FEAT_EVAL) 4069 #if defined(FEAT_EVAL)
4073 static int do_swapexists(buf_T *buf, char_u *fname);
4074
4075 /* 4070 /*
4076 * Trigger the SwapExists autocommands. 4071 * Trigger the SwapExists autocommands.
4077 * Returns a value for equivalent to do_dialog() (see below): 4072 * Returns a value for equivalent to do_dialog() (see below):
4078 * 0: still need to ask for a choice 4073 * 0: still need to ask for a choice
4079 * 1: open read-only 4074 * 1: open read-only