View changes and schema check use the wrong base copy for GeoPackages in subfolders

Open
#963 0 comments 0 reactions 1 assignee View on GitHub

@harminius is already working on this.

Since Nov 12, 2026.

  • #964 by @harminius — open

Assessment

This issue has not been assessed yet.

Description

bug

For a GeoPackage in a project subfolder (e.g. data/survey.gpkg), the plugin looks for the base copy at .mergin/survey.gpkg instead of .mergin/data/survey.gpkg:

View changes shows no tab for the layer.
Project status doesn't warn about schema changes in that layer.
If the project root also has a survey.gpkg, the subfolder layer is compared with the root one. View changes then shows changes nobody made, or fails with GeoDiffLibError when the tables differ. Project status warns about a schema change nobody made.
Extract local changes is affected the same way, and Create diff sends only the file name to the server.
To reproduce:

Create a project with a point layer in data/survey.gpkg and sync it.
Add a feature and save.
Click View changes: there's no tab for the layer.

https://github.com/user-attachments/assets/853b53d6-b37f-4dec-89ba-ad932ffc2990

Dominant language
Python
Stars
45
Forks
21
Avg merge
3d 13h
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MerginMaps/qgis-plugin

All issues in MerginMaps/qgis-plugin

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.