Export Parts dialog: "cannot determine file type", subsequent Export operations then fail too

• Oct 12, 2013 - 20:35
Type
Functional
Severity
S4 - Minor
Status
closed
Project

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:

  1. Load a score with some parts in it
  2. File -> Export Parts...
  3. Click the Select button

Workaround:

  1. Inside the dialog, create a new folder (not file) with the desired extension in its name, for example "test.pdf" por pdf export.
  2. Select that folder
  3. 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.

Title [trunk] Export parts dialog: "cannot determine file type" Export Parts dialog: "cannot determine file type", subsequent Export operations then fail too

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.

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