rendered paste bodyIndex: mythmusic/mythmusic/filescanner.cpp
===================================================================
--- mythmusic/mythmusic/filescanner.cpp (revision 12879)
+++ mythmusic/mythmusic/filescanner.cpp (working copy)
@@ -344,10 +344,20 @@
{
while (query.next())
{
- QString name = m_startdir +
- QString::fromUtf8(query.value(2).toString()) + "/" +
- QString::fromUtf8(query.value(0).toString());
+ QString name;
+ if (query.value(2).toString() != "")
+ {
+ name = m_startdir +
+ QString::fromUtf8(query.value(2).toString()) + "/" +
+ QString::fromUtf8(query.value(0).toString());
+ }
+ else
+ {
+ name = m_startdir +
+ QString::fromUtf8(query.value(0).toString());
+ }
+
if (name != QString::null)
{
if ((iter = music_files.find(name)) != music_files.end())