]> granicus.if.org Git - vim/commitdiff
patch 8.2.0236: MS-Windows unintall doesn't delete vimtutur.bat v8.2.0236
authorBram Moolenaar <Bram@vim.org>
Sun, 9 Feb 2020 13:27:20 +0000 (14:27 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 9 Feb 2020 13:27:20 +0000 (14:27 +0100)
Problem:    MS-Windows unintall doesn't delete vimtutur.bat.
Solution:   Change directory before deletion. (Ken Takata, closes #5603)

src/uninstall.c
src/version.c

index b2a20cded83438fcabf92ec290c92b4e912efc6d..ef0538a140a515dcc1c95ce92e7b4dc4bea33d95 100644 (file)
@@ -233,6 +233,10 @@ remove_batfiles(int doit)
     int         i;
     int         found = 0;
 
+    // avoid looking in the "installdir" by chdir to system root
+    mch_chdir(sysdrive);
+    mch_chdir("\\");
+
     for (i = 1; i < TARGET_COUNT; ++i)
     {
        batfile_path = searchpath_save(targets[i].batname);
@@ -249,6 +253,8 @@ remove_batfiles(int doit)
            free(batfile_path);
        }
     }
+
+    mch_chdir(installdir);
     return found;
 }
 
index 6a5f2e779c371b1d29b2ba71f0b04552677cf5dd..7ca6baacf1bad0c603352fc263a621726aba4593 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    236,
 /**/
     235,
 /**/