Skip to content

Conversation

@tomasMizera
Copy link
Collaborator

@tomasMizera tomasMizera commented Nov 21, 2025

This PR adds some enhancements to the sanitization logic:

  • whitespace in individual folders/files within paths is now trimmed, e.g. / my folder / my file.ext ~> /my folder/my file.ext
  • whitespace before file extension is now trimmed, e.g. /my folder/my file .ext ~> /my folder/my file.ext

These scenarios were possible because of the custom photo name formats. It then caused problems when syncing to desktop builds or server did not allows such an upload at all.

These two enhancements are used in:

  • projectwizard.cpp -> sanitize project name so it does not include a whitespace at the end
  • attributecontroller.cpp -> when renaming photos

Fixes #3976
Fixes #4022
Fixes (likely) #4157 - needs to be tested (cc @RastoHu @IvaKuklica)
See also MerginMaps/qgis-plugin#693

Qt handles path separators automatically, but would be good to test this out on Windows, just to be sure.

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

Pull Request Test Coverage Report for Build 19640387302

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1694 unchanged lines in 13 files lost coverage.
  • Overall coverage decreased (-0.1%) to 19.503%

Files with Coverage Reduction New Missed Lines %
mm/app/projectsmodel.cpp 1 69.17%
mm/app/featuresmodel.cpp 2 49.32%
mm/app/multieditmanager.h 2 0.0%
build-mm-db/app/MerginMaps_autogen/EWIEGA46WW/moc_featuresmodel.cpp 8 8.16%
build-mm-db/app/MerginMaps_autogen/7HEK2XT3N7/moc_testutilsfunctions.cpp 9 68.97%
mm/core/merginuserauth.cpp 9 68.24%
mm/app/projectwizard.cpp 26 2.13%
build-mm-db/app/MerginMaps_autogen/EWIEGA46WW/moc_multieditmanager.cpp 39 0.0%
mm/app/inpututils.cpp 72 54.22%
mm/app/multieditmanager.cpp 86 0.0%
Totals Coverage Status
Change from base Build 19565357048: -0.1%
Covered Lines: 13853
Relevant Lines: 71030

💛 - Coveralls

Copy link
Contributor

@Withalion Withalion left a comment

Choose a reason for hiding this comment

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

Just some minor improvements

@tomasMizera
Copy link
Collaborator Author

Hi @RastoHu @IvaKuklica, here are the builds to test:

🍎 iOS: 25.11.828011
🤖 Android: 733911
🪟 Win: Exe from artefacts here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants