Fix hdiffpatch executables not being detected on Windows

Signed-off-by: tretrauit <tretrauit@gmail.com>
This commit is contained in:
tretrauit 2022-03-31 20:38:59 +07:00
parent fd00e8b51d
commit 4b99162bce
Signed by: tretrauit
GPG Key ID: 862760FF1903319E
2 changed files with 5 additions and 3 deletions

View File

@ -9,7 +9,7 @@ README = (HERE / "README.md").read_text()
setup(
name='worthless',
version='1.3.0',
version='1.3.1',
packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'],
url='https://git.froggi.es/tretrauit/worthless-launcher',
license='MIT License',

View File

@ -95,7 +95,8 @@ class HDiffPatch:
return None
def get_hpatchz_executable(self):
return self._get_hdiffpatch_exec("hpatchz")
hpatchz_name = "hpatchz" + (".exe" if platform.system() == "Windows" else "")
return self._get_hdiffpatch_exec(hpatchz_name)
async def patch_file(self, in_file, out_file, patch_file):
hpatchz = self.get_hpatchz_executable()
@ -104,7 +105,8 @@ class HDiffPatch:
return await asyncio.create_subprocess_exec(hpatchz, "-f", in_file, patch_file, out_file)
def get_hdiffz_executable(self):
return self._get_hdiffpatch_exec("hdiffz")
hdiffz_name = "hdiffz" + (".exe" if platform.system() == "Windows" else "")
return self._get_hdiffpatch_exec(hdiffz_name)
async def _get_latest_release_info(self):
async with aiohttp.ClientSession() as session: