qfieldsync
qfieldsync copied to clipboard
QFieldSync defaults to copying all directories in the dir containing foo.qgs
Describe the issue
When packaging for "cable", QFieldSync plugin defaults to including all directories contained within the directory that holds foo.qgz.
Reproduction steps
Steps to reproduce the behavior:
- Have a directory to contain one's qgis work, with foo.qgz and 5 other *.qgz
- Also have DATA/*.gpkg, and various other subdirectories with data, some quite large, the vast majority of which are not referenced by foo.
- Configure foo for export and choose copy/offline/reference for the layers. (This works fine.)
- Click export. See that the directories are checked under "advanced". Or, don't notice and click create and get 5 GB (in my case :-( ) in the export dir.
- Clean up the export dir and do the export again, taking care to deselect all directories.
- time passes
- add a new subdirectory (because I found new data to download). for this bug, "mkdir TEST-FAIL; touch TEST-FAIL/foo"
- export again, and notice or not notice that the new directory is checked. when pretending not to notice, observe TEST-FAIL/foo in the export dir.
Expected behavior
By default, directories are not exported/copied. This only happens if the user takes an affirmative action. Probably the advanced tab starts out closed but that's not important.
I don't understand why you'd want to do this, normally. It seems to be about bring a dataset along with the package that is not actually referenced by the qgis project file. I can believe someone would, but it seems so unusual that I don't understand why it's default.
Observed behavior
Many directories appear in the export dir.
QGIS (please complete the following information)
- OS: NetBSD 10 amd64
- QGIS: 3.34.10
- QFieldSync: 4.10.1 (but I don't think this is very new)
QField (please complete the following information)
I'm up to date, but the above can be observed without even having a device for QField.
Additional information
- Problem started happening recently, didn't happen in an older version of QField: I think this is very longstanding.
- Problem can be reliably reproduced, doesn't happen randomly: Seems to happen 100% for me.
- Problem happens with all files and projects, not only some files or projects: Yes, seems so