summaryrefslogtreecommitdiff
path: root/src/uninstall.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-09 14:27:20 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-09 14:27:20 +0100
commit57ea2924e5dd14aac716a1ee349bdb61f6429f59 (patch)
tree0f7f123b53c403ca7d81e33737e858fab08de96e /src/uninstall.c
parentdbe5d361feb65137099644329cf0ecfd4a945a14 (diff)
downloadvim-git-57ea2924e5dd14aac716a1ee349bdb61f6429f59.tar.gz
patch 8.2.0236: MS-Windows unintall doesn't delete vimtutur.batv8.2.0236
Problem: MS-Windows unintall doesn't delete vimtutur.bat. Solution: Change directory before deletion. (Ken Takata, closes #5603)
Diffstat (limited to 'src/uninstall.c')
-rw-r--r--src/uninstall.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/uninstall.c b/src/uninstall.c
index b2a20cded..ef0538a14 100644
--- a/src/uninstall.c
+++ b/src/uninstall.c
@@ -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;
}