Skip to content

Commit

Permalink
Fix root_dir parameter not existing in older python version
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinBuira committed Nov 5, 2024
1 parent b766621 commit 96642ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Mergin/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 96642ce

Please sign in to comment.