diff --git a/.github/workflows/run_pytests.yaml b/.github/workflows/run_pytests.yaml index e6cbd06..eb4fd33 100644 --- a/.github/workflows/run_pytests.yaml +++ b/.github/workflows/run_pytests.yaml @@ -8,7 +8,7 @@ on: pull_request: {} env: - QUPATH_VERSION: 0.5.0 + QUPATH_VERSION: 0.5.1 jobs: # RUN PYTEST ON PAQUO SOURCE diff --git a/paquo/_utils.py b/paquo/_utils.py index 171ab68..638620f 100644 --- a/paquo/_utils.py +++ b/paquo/_utils.py @@ -217,7 +217,11 @@ def extract_qupath(file, destination, system=None): break else: raise RuntimeError("no qupath extracted?") - shutil.move(os.path.join(tmp_dir, name), qp_dst) + extract_dir = os.path.join(tmp_dir, name) + if os.path.isdir(os.path.join(extract_dir, "QuPath")): + # in some cases there is a nested QuPath directory + extract_dir = os.path.join(extract_dir, "QuPath") + shutil.move(extract_dir, qp_dst) return qp_dst elif system == "Darwin":