File name not exported correctly

• Dec 16, 2015 - 07:07
Type
Functional
Severity
S4 - Minor
Status
closed
Project

The file name is not exported correctly via 'File→Export Parts' when using a period ('.') in the file name. Exporting a file 'Test Score No.2 - lorem ipsum.mscz' results in:

- Test Score No-Score_and_Parts.pdf
- Test Score No-Part1.pdf
- Test Score No-Part2.pdf

All characters after the period are cropped.


Comments

The code is in mscore/file.cpp, line 1693 and 1727. Looks like QFileInfo::baseName() doesn't work like we'd like it to work, check http://doc.qt.io/qt-5.4/qfileinfo.html#baseName, it says "The base name consists of all characters in the file up to (but not including) the first '.' character."

A possible fix would be to use QFileInfo::completeBaseName() instead, see http://doc.qt.io/qt-5.4/qfileinfo.html#completeBaseName, "The complete base name consists of all characters in the file up to (but not including) the last '.' character."

Which OS and MuseScore versions? I can reproduce this problem with MuseScore 2.0.2 on Windows XP. However, I can't reproduce it (i.e. works as expected) in MuseScore 2.0.2 on Ubuntu 15.10, so it seems this issue is OS-specific.

Well then, maybe I did something wrong but that's what happened when I tested this (it worked on Ubuntu, but not on Windows). Sorry, I don't have any more time to spend on this now though. I suggest you run a test for yourself.