diff src/misc2.c @ 15188:2d8c31ae1e24 v8.1.0604

patch 8.1.0604: autocommand test fails on MS-Windows commit https://github.com/vim/vim/commit/9eb76af451ddd8eaad0cd5dd629f18c4f4035171 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 16 16:30:21 2018 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 16 Dec 2018 16:45:05 +0100
parents 90ab2d3ce11d
children 3a99b2e6d136
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -3402,7 +3402,7 @@ vim_chdirfile(char_u *fname, char *trigg
     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