Export Parts dialog: "cannot determine file type", subsequent Export operations then fail too
The "Export parts" dialog always gives the message "cannot determine file type" and no parts are exported, unless the selected directory has an extension.
How to reproduce:
- Load a score with some parts in it
- File -> Export Parts...
- Click the Select button
Workaround:
- Inside the dialog, create a new folder (not file) with the desired extension in its name, for example "test.pdf" por pdf export.
- Select that folder
- Click the Select button
The problem seems to be in the method "exportParts()", in "file.cpp".
The dialog is created as a directory select dialog (i.e. the last parameter is set to true):
QString fn = getSaveScoreName(saveDialogTitle, saveDirectory, filter, true);
That restricts the user to select directories only.
Then the returned directory name is used to get the desired extension:
if (fn.isEmpty()) return false; QFileInfo fi(fn); lastSaveCopyDirectory = fi.absolutePath(); QString ext = fi.suffix(); if (ext.isEmpty()) { QMessageBox::critical(this, tr("MuseScore: Export Parts"), tr("cannot determine file type")); return false; } </p> So <u>if the selected directory doesn't have an extension the dialog always fails</u>. Using OpenSUSE 12.2 (64 bits). GIT commit: cc016f8
Comments
Worse, from then on, every time you try to export anything - not via Export Parts, but the regular Export command - the file dialog now insists on your selecting a "Directory" rather than a filename. I think this had been mentioned before on IRC or the forum but I don't see an issue for it.
I can confirm on dbac0f2 kxstudio 14.04 - kde 4.13
Can't export neither parts nor entire score.
Workaround consisting in create a directory with extension doesn't work for me. After exporting in such a directory, a message says me files have been exported, but the directory is empty.
Fixed in f044eec222
Automatically closed -- issue fixed for 2 weeks with no activity.
For me, exporting a smaller score worked, but exporting a larger score, i.e Brandenburg Concerto 5, the message showed up.
Whatever this might be, it most probably would be e different issue than this one, which got fixed a year ago, so please open a new issue and attach the score that is showing the behavoir along with precise steps to reproduce and Information about the version or MuseScore and the OS you are using