Opening score from the OS creates two entries for the same score in the recent scores list

• Mar 6, 2015 - 14:37

MuseScore 2.0 Beta pre-release.

* erase recent scores list
* close MuseScore
* open a score double clicking from Explorer
* close the score inside MuseScore
* recent scores list has two entries of the same file


Comments

What OS are you on? Anything unusual about the folder where those files live - like they live on networked drives, removable drives, etc? Any symbolic links / shortcuts involved? I find sometimes the same file can have two different pathnames in cases like this, and that might explain this. I too get duplicates sometimes on Ubuntu, and I know it's because of this discrepancy (files live on a removable SD drive that is has different possible pathnames).

In reply to by Jojo-Schmitz

Can you run under the debugger? If so, set a breakpoint on MuseScore::addRecentScore(Score*) in musescore.cpp. When the breakpoint is hit, you will see the pathnames MuseScore is trying to add, and then check the contents of _recentScores (under "this"), and you will see the full pathnames of the scores already in the list.

WIndows 7 has this concept of "libraries" and the whole "My Documents" versus "Documents" thing, and I can easily believe it would lead to the same file being addressed different ways depending on how it was presented. My guess is somehow, the file is showing up with one version of this pathname as importedFilePath(() but a different version of this same pathname as absoluteFilePath(). Or something like that.

I kind of think we should be using canonicalFilePath() instead of absolutelFilePath(), and making sure importedFilePath() also is always canonicalized, but I suspect that too would not be foolproof. And I know there have been other worse bugs with this list that have been fixed over the last few months, and I'd hate to risk regressions.

Do you still have an unanswered question? Please log in first to post your question.