MerginMaps / qgis-plugin

QGIS plugin for managing Mergin Maps projects
GNU General Public License v3.0
36 stars 13 forks source link

Fix 617: Reload project following sync of updated .qgz file on windows #632

Closed ValentinBuira closed 1 month ago

ValentinBuira commented 1 month ago

The qgis project was not reloading after a sync on windows when there was only change to the .qgz file

This happened because QgsProject.instance().fileName() &QgsProject.instance().absolutePath()returned unix-style path even on windows. This behavior mismatch with the return of e.g os.path.join in python.

This PR fix the is by adding an extra os.path.normpath

Fix #617

ValentinBuira commented 1 month ago

Also, it would be nice if at some point we standardized the way paths are handled though, as now there are combinations of QT style (forward slashes, used by qgis api), os.path and pathlib.Path

Agreed I think pathlib is the good candidate and the more pleasant to work with

volcan01010 commented 1 month ago

Thank you for fixing this so quickly.