Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ __pycache__/
/buildscripts/cmake/SetupBuildEnvironment.user.cmake

# CMake User presets
CMakeUserPresets.json
CMakeUserPresets.json
Copy link
Contributor

Choose a reason for hiding this comment

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

Some whitespace damage. Certainly not a needed change

7 changes: 5 additions & 2 deletions src/engraving/infrastructure/mscio.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ namespace mu::engraving {
//! NOTE The main format is MuseScore, is a zip archive with a specific structure
static const std::string MSCZ = "mscz";

//! NOTE This is the automatically generated backup file.
static const std::string MSCZ_BACKUP = "mscz~";

//! NOTE Before MuseScore 4, MuseScore could save data in one xml file (excluding binary) with `.mscx` extension.
//! Starting from MuseScore 4, only the score domain model store to the `.mscx` file,
//! and other data, such as styles, chordlist, synthesizer settings, etc. are stored in separate files.
Expand All @@ -46,7 +49,7 @@ static const std::string MSCS = "mscs";

inline bool isMuseScoreFile(const std::string& suffix)
{
return suffix == MSCZ || suffix == MSCX || suffix == MSCS;
return suffix == MSCZ || suffix == MSCX || suffix == MSCS || suffix == MSCZ_BACKUP;
}

enum class MscIoMode : unsigned char {
Expand All @@ -58,7 +61,7 @@ enum class MscIoMode : unsigned char {

inline MscIoMode mscIoModeBySuffix(const std::string& suffix)
{
if (suffix == MSCZ) {
if (suffix == MSCZ || suffix == MSCZ_BACKUP) {
return MscIoMode::Zip;
} else if (suffix == MSCX) {
return MscIoMode::Dir;
Expand Down
2 changes: 1 addition & 1 deletion src/project/internal/projectactionscontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1901,7 +1901,7 @@ async::Promise<io::path_t> ProjectActionsController::selectScoreOpeningFile() co
"*.ove *.scw *.bmw *.bww *.gtp *.gp3 *.gp4 *.gp5 *.gpx *.gp *.ptb *.mei *.tef *.mscx *.mscs *.mscz~";

std::vector<std::string> filter { muse::trc("project", "All supported files") + " (" + allExt + ")",
muse::trc("project", "MuseScore files") + " (*.mscz)",
muse::trc("project", "MuseScore files") + " (*.mscz *.mscz~)",
Copy link
Member

Choose a reason for hiding this comment

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

It is already listed below in line 1918 as "MuseScore backup files"

muse::trc("project", "MusicXML files") + " (*.mxl *.musicxml *.xml)",
muse::trc("project", "MIDI files") + " (*.mid *.midi *.kar)",
muse::trc("project", "MuseData files") + " (*.md)",
Expand Down