Save dialogue - Glitchy filename test
@MrTopom is already working on this.
Since Aug 29, 2023.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
As mentioned [here](https://github.com/LMMS/lmms/pull/3526#issuecomment-304919073), there is a remaining problem with the save dialogue.
Quote by @tresf
> There's also the double-extension problem, where .remove() makes no guarantee that the extension is at the end of the file. Again, very rare edge-case but when it happen to someone it won't be obvious. For example ocean.waves.wav would become oceanes.wav. :)
Basically, we test for already existing files to avoid saving over them. We also test for existing file minus suffix as you can enter just the name and let LMMS/Qt add the suffix but this earlier didn't test for the proposed name 'with' suffix so, as an example, saving the project 'test' when 'test.mmp' was present would save over test.mmp (See #2230).
The remaining issue is that all occasions of the suffix is removed from the filename when testing. Not only the suffix proper on the end.
Related pull requests: https://github.com/LMMS/lmms/pull/2230 https://github.com/LMMS/lmms/pull/3526 https://github.com/LMMS/lmms/pull/4768
Contributor guide
No contributing guide indexed for this repository
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.