Skip to content
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

Merged

Conversation

igorkorsukov
Copy link
Contributor


file.setFileName(filename);
if (!file.open(mode)) {
return false;
Copy link
Contributor

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 ;-)

Copy link
Contributor Author

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);
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@anatoly-os anatoly-os merged commit b91ad64 into musescore:3.x Sep 7, 2020
anatoly-os added a commit that referenced this pull request Sep 7, 2020
@igorkorsukov igorkorsukov deleted the mu3x/exportaudio_notansipath branch October 27, 2020 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants