ossappscollective / ossappscollective/OSS-DocumentScanner

[BUG] File overwritten (without asking for it)

Open
#467 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
Dominant language
C++
Stars
2.4k
Forks
121
Avg merge
1d 58m
Merged PRs (30d)
17

Description

Which app is your issue for

No response

Version

1.14.5 Build 121

What platform are you using?

No response

OS Version

GrapheneOS 15

What happened?

When exporting an file to the standard export location (the user set up location) a file with the same filename is overwritten. Alas in the app itself the "name" of the file can be the same (e.g. automatically created filename of every new scan like the date: "2025.05.22"), when exporting a file the "name" becomes the "file name" and it is not checked if in the export location a file with the same name already existed.

Background:
I like to export all scans and rename them on my desktop pc instead of fiddling on my phone keyboard.

Solution:
A checkup could be carried out if a file with the same filename existed already in that export location. If yes, then a "_1" is added to the filename. If that already exist s "_2" and so on could be added. That will make sure that no data loss can occur in the future.

Relevant log output

Code of Conduct
  • I agree to follow this project's Code of Conduct

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by tracing the export flow for the standard user-selected location and reproduce an export when the target filename already exists; done means an existing file is preserved and the new export receives an available numbered suffix such as _1 or _2.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cpp
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.