mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
patch 8.1.0604: autocommand test fails on MS-Windows
Problem: Autocommand test fails on MS-Windows. Solution: Use pathcmp() instead of strcmp() to check if a directory differs.
This commit is contained in:
@ -9185,7 +9185,7 @@ ex_cd(exarg_T *eap)
|
||||
}
|
||||
#endif
|
||||
dir_differs = new_dir == NULL || prev_dir == NULL
|
||||
|| STRCMP(prev_dir, new_dir) != 0;
|
||||
|| pathcmp((char *)prev_dir, (char *)new_dir, -1) != 0;
|
||||
if (new_dir == NULL || (dir_differs && vim_chdir(new_dir)))
|
||||
EMSG(_(e_failed));
|
||||
else
|
||||
|
@ -3402,7 +3402,7 @@ vim_chdirfile(char_u *fname, char *trigger_autocmd)
|
||||
vim_strncpy(new_dir, fname, MAXPATHL - 1);
|
||||
*gettail_sep(new_dir) = NUL;
|
||||
|
||||
if (STRCMP(old_dir, new_dir) == 0)
|
||||
if (pathcmp((char *)old_dir, (char *)new_dir, -1) == 0)
|
||||
// nothing to do
|
||||
res = OK;
|
||||
else
|
||||
|
@ -799,6 +799,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
604,
|
||||
/**/
|
||||
603,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user