From ecfbdef60f517d3a24d8bbc13d5de3f73be291cd Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Thu, 16 Feb 2023 09:23:07 +0100 Subject: [PATCH] Fix pathlib usage Regression from 4a581bdf. --- fdroidserver/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 802ea4ee..831b0cb5 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1616,7 +1616,7 @@ def manifest_paths(app_dir, flavours): def fetch_real_name(app_dir, flavours): """Retrieve the package name. Returns the name, or None if not found.""" for path in manifest_paths(app_dir, flavours): - if not path.endswith('.xml') or not os.path.isfile(path): + if not path.suffix == '.xml' or not path.is_file(): continue logging.debug("fetch_real_name: Checking manifest at " + path) try: @@ -1725,7 +1725,7 @@ def parse_androidmanifests(paths, app): return None for path in paths: - if not os.path.isfile(path): + if not path.is_file(): continue logging.debug(_("Parsing manifest at '{path}'").format(path=path))