MerginMaps / MerginMaps/mobile
Photo naming: Sequence number inserted at wrong position when filename contains multiple dots
@xkello is already working on this.
Since Sep 15, 2026.
- Dominant language
- C++
- Stars
- 388
- Forks
- 87
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 20
Description
Description
When attaching photos where the resulting (expression‑generated) filename already contains multiple dots, the sequence/index suffix (added to avoid duplicates on second/third attachments) is inserted after the first segment instead of just before the file extension. This produces awkward / inconsistent filenames and makes it harder to correlate related images.
Example:
Original (first photo): site.alpha.beta.jpg
Second photo expected: site.alpha.beta (1).jpg
Actual second photo: site (1).alpha.beta.jpg (sequence inserted too early in the name).
Tested in project: tester-ws-1/test_photo-sketches.
Environment
staging
Application (+ app version, build, operating system)
- Mergin Maps Mobile (Android, iOS)
- App versions:
Android: 2025.6.0 (714011)
iOS: 2025.6.0 (25.10.809611)
Steps to reproduce
- Open project
tester-ws-1/test_photo-sketcheson mobile device. - Add new record in point_photo2_layer.
- Add (attach) the photos to the both photo widgets.
- Save record.
- Inspect generated filename for the second photo locally (e.g., via Local changes list or project folder after sync).
Actual results
- The sequence/increment (e.g.
(1)) is inserted after the first name token (before later dot-separated parts):twoPhotos/point_photo2_layer-rastislav (1).hudak020625-071025_1626.jpg. - This breaks the logical grouping of the base name and makes automated parsing harder.
Expected results
- The sequence suffix should be inserted immediately before the extension, preserving the entire base name (all segments before the final dot).
- Desired:
twoPhotos/point_photo2_layer-rastislav.hudak020625-071025_1626 (1).jpg
- Desired:
- Behavior should be consistent regardless of how many dots appear in the base portion.
- If a collision still occurs (very unlikely), continue incrementing at the same position (before extension).
Screenshots or logs
Conclusion
Created by GitHub Copilot and supervised by a human test analyst.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.