Skip to content

Commit

Permalink
Fix that Windows uninstaller doesn't remove vimtutor.bat
Browse files Browse the repository at this point in the history
Fix vim#5597.

Fix that remove_batfiles() wrongly tries to delete
"C:\Program Files (x86)\Vim\vim82\vimtutor.bat" instead of
"C:\Windows\vimtutor.bat".

Do the same thing as find_bat_exe() in dosinst.c.
  • Loading branch information
k-takata committed Feb 9, 2020
1 parent dbe5d36 commit b3b677d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/uninstall.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -249,6 +253,8 @@ remove_batfiles(int doit)
free(batfile_path);
}
}

mch_chdir(installdir);
return found;
}

Expand Down

0 comments on commit b3b677d

Please sign in to comment.