Make MS recognise the `.mscz~` filetype
Your idea
MuseScore should be able to recognise and open its own backup filetype (.mscz~).
Problem to be solved
The user should not have to manually rename the file and remove the tilde just for the program to recognise it.
Cannot read file [path to file].mscz~ Unknown filetype
The file's content is exactly the same as a .mscz file (by design).
Prior art
No response
Additional context
No response
Checklist
- [X] This request follows the guidelines for reporting issues
- [X] I have verified that this feature request has not been logged before, by searching the issue tracker for similar requests
Hello, I'm a student in a university software engineering course and for our final project, we contribute to an open-source project. This seems like a perfect task to work on. Could I please be assigned to this issue?
I have submitted a fix for this issue. You can view the Pull Request here: https://github.com/musescore/MuseScore/pull/31352
I commented in the PR, but I don't think we should be this permissive with backup files. There is a reason we don't already do this - to prevent users from shooting themselves in the foot by accidentally opening the wrong copy of a file. I don't think we should include backup files in the filter. If a user explicitly opens one anyhow, I think they should see a warning.
Maybe marking the file as "imported" is enough?
[second thoughts] Maybe a warning isn't a bad idea. I was initially thinking of the risk of accidentally overwriting a backup file, which is already prevented enough by the fact that you can't save with the mscz~ extension. So that's not really what we need to warn about, but protecting users from simply opening the wrong copy might also be important enough to show a warning. @bkunda @avvvvve may I ask you to design some copy for this?
Actually the issue is a regression vs. Mu3, which did allow for this (actually to ".mscz," at the time)
It could be something like this:
You're opening a backup file Backup files are saved with the extension '.mscz~'. If you want to make and save changes to this file after opening it, you'll have to save it as a new file.
But I would like to be able to test this PR myself. I'm not seeing any builds available to download in the PR—is it possible to generate those @gracetai26?
I worry a bit that if I am looking for a file I've saved called "unique_title.mscz", and I search "unique_title", as a first-time user I might not understand the different between the file with and without the ~. Even with a dialog, if I don't know what a backup file is, that would just be confusing to see in the file list.
@bkunda I'm not sure we want this behavior.
(mscz~ files are in the list already anyway; the probability a user will see them is (and remains) small because they live inside a hidden .mscbackup folder. The behaviour requested here only makes it slightly easier to view backup files if one wants to, by being able to open them directly instead of first having to copy and rename them to mscz.)
Some users have enabled hidden files & folders to be displayed, in which case both the original and backup will show up in searches within your file browser. I'd mostly just like double-checking the wrong (backup) one to produce some obvious sign of that.
But also, older versions of MuseScore kept backup files in the same folder as the original, rather than in a subfolder. So, many people have older backup files that would now start showing up within MuseScore if they have hidden files enabled. So the same applies there - a warning when opening a backup seems warranted to me.
None of this is what I would crucially important, but to me allowing backup files to be treated completely normally is just asking for increased user confusion that could easily be dialed back with a warning.