From 0c31c4a5ab0bfdcf158836cda724ccb2e09fddd0 Mon Sep 17 00:00:00 2001 From: Gerhard Olsson Date: Fri, 3 Jan 2020 01:24:26 +0100 Subject: [PATCH] win fixes --- fdroidserver/common.py | 5 ++++- tests/update.TestCase | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 0e29814d..236855b3 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -557,9 +557,12 @@ def find_sdk_tools_cmd(cmd): sdk_platform_tools = os.path.join(config['sdk_path'], 'platform-tools') if os.path.exists(sdk_platform_tools): tooldirs.append(sdk_platform_tools) - tooldirs.append('/usr/bin') + if os.path.exists('/usr/bin'): + tooldirs.append('/usr/bin') for d in tooldirs: path = os.path.join(d, cmd) + if not os.path.isfile(path): + path += '.exe' if os.path.isfile(path): if cmd == 'aapt': test_aapt_version(path) diff --git a/tests/update.TestCase b/tests/update.TestCase index 2d4fd6ca..04bf42ca 100755 --- a/tests/update.TestCase +++ b/tests/update.TestCase @@ -411,7 +411,7 @@ class UpdateTest(unittest.TestCase): def javagetsig(self, apkfile): getsig_dir = 'getsig' - if not os.path.exists(getsig_dir + "/getsig.class"): + if not os.path.exists(os.path.join(getsig_dir, "getsig.class")): logging.critical("getsig.class not found. To fix: cd '%s' && ./make.sh" % getsig_dir) sys.exit(1) # FDroidPopen needs some config to work