Make hooks location check consistent by tyrielv · Pull Request #1836 · microsoft/VFSForGit (original) (raw)
When checking that GVFS.Hooks.exe matches the version of GVFS.exe, GVFS is currently using where.exe to find GVFS.Hooks.exe on the path. However, when actually running GVFS.Hooks.exe, it uses the file that is in the same directory as GVFS.exe.
This PR removes usage of where.exe for consistency, instead using the directory of gvfs.exe to locate GVFS.Hooks.exe in all cases.
Combined with !1835, this change fixes an error case when a user uninstalls GVFS then reinstalls into a different directory, where existing clones still point to the old directory and will hit errors when mounting.