diff --git a/Mergin/diff.py b/Mergin/diff.py index 162a297..81d6f6c 100644 --- a/Mergin/diff.py +++ b/Mergin/diff.py @@ -330,7 +330,7 @@ def make_version_changes_layers(project_path, version): layers = [] version_dir = os.path.join(project_path, ".mergin", ".cache", f"v{version}") - for f in glob.iglob("*.gpkg", root_dir=version_dir): + for f in glob.iglob(f"{version_dir}/*.gpkg"): gpkg_file = os.path.join(version_dir, f) schema_file = gpkg_file + "-schema.json" if not os.path.exists(schema_file): @@ -377,7 +377,7 @@ def make_version_changes_layers(project_path, version): def find_changeset_file(file_name, version_dir): """Returns path to the diff file for the given version file""" - for f in glob.iglob("*.gpkg-diff*", root_dir=version_dir): + for f in glob.iglob(f"{version_dir}/*.gpkg-diff*"): if f.startswith(file_name): return os.path.join(version_dir, f) return None