Album::loadScores() won't load a score that has a relative path

• Mar 1, 2016 - 03:40
Type
Functional
Severity
S4 - Minor
Status
active
Regression
No
Workaround
No
Project

looking at the code for Album::loadScores(), I notice that there is logic to detect if a path is relative, and then stores the path in QString ip :

            QString ip = item->path;
            if (ip[0] != '/') {
                  // score path is relative to album path:
                  QFileInfo f(_path);
                  ip = f.path() + "/" + item->path;
                  }

But then when actually performing the load, the code uses item->path

 score->loadMsc(item->path, false);

It seems to me very clear that this is unintentional mistake...seems like the code should load using "ip" instead of item->path, because right now "ip" isn't even be used!

(Somewhere I remember someone mentioned a feature request to have album store paths relatively...I can't seem to find any metnion of that in the forums or issue tracker now. Maybe I should retitle this issue to also be a feature request to save album score paths relatively.)


Comments