Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use QGIS' utility function to detect and copy sidecar files #90

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

nirvn
Copy link
Member

@nirvn nirvn commented Jul 21, 2024

This PR fixes opengisch/QField#5451 .

Background: until now, libqfieldsync had a limited self-curated detection/handling of sidecar files. The PR retires that code in favor of QGIS' QgsFileUtils.sidecarFilesForPath(path) , which does a much better job at returning sidecar files and is future proof (as it relies on individual providers to return sidecar lists, see https://github.com/qgis/QGIS/blob/master/src/core/qgsfileutils.cpp#L457-L475).

Practically speaking, not capturing all sidecar files meant that projects both packaged for USB cable transfer as well as cloud projects could have key files missing and break layers (see above-mentioned issue).

libqfieldsync/layer.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@suricactus suricactus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Only one comment on detecting the QGIS version.

@nirvn nirvn merged commit 9d2faac into master Jul 23, 2024
7 checks passed
@nirvn nirvn deleted the sidecar_fix branch July 23, 2024 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for world (.wld) files for georeferencing with cloud projects
2 participants