Skip to content

Commit

Permalink
fix #63366: prevent illegal workspace names
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Jun 2, 2015
1 parent 31a8d3d commit 6aacfb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mscore/workspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void MuseScore::createNewWorkspace()
tr("Workspace name:"));
if (s.isEmpty())
return;
s = s.replace( QRegExp( "[" + QRegExp::escape( "\\/:*?\"<>|" ) + "]" ), "_" ); //FAT/NTFS special chars
for (;;) {
bool notFound = true;
foreach(Workspace* p, Workspace::workspaces()) {
Expand All @@ -124,6 +125,7 @@ void MuseScore::createNewWorkspace()
);
if (s.isEmpty())
return;
s = s.replace( QRegExp( "[" + QRegExp::escape( "\\/:*?\"<>|" ) + "]" ), "_" ); //FAT/NTFS special chars
}
else
break;
Expand Down

0 comments on commit 6aacfb1

Please sign in to comment.