-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #308694 fixed open files with the path name that contains non-ASC… #6531
fix #308694 fixed open files with the path name that contains non-ASC… #6531
Conversation
mscore/exportaudio.cpp
Outdated
|
||
file.setFileName(filename); | ||
if (!file.open(mode)) { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old code style, 6 spaces and banner style indent ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed :)
@@ -254,7 +257,12 @@ bool MuseScore::saveAudio(Score* score, const QString& name) | |||
if ((mode & QIODevice::WriteOnly) == 0) { | |||
return false; | |||
} | |||
sf = sf_open(qPrintable(filename), SFM_WRITE, &info); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I have the suspicion that this qPrintable()
is the culprit already and alone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first, I thought so too, replaced it with qUtf8Printable - not working.
Started searching, found that the problem is known libsndfile/libsndfile#393
Especially for Windows, there is a separate function for opening files (need to do #ifdef WINDOWS ...
)
I looked at what other opening functions are there, I saw that there is a function that takes a file descriptor and a decision came to my mind that I made, I think it is the most simple and reliable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It certainly looks sweet and simple.
…II characters for export audio
2d173c5
to
b03ddd4
Compare
Resolves: https://musescore.org/en/node/308694