All pastes #373758 Raw Edit

Something

public text v1 · immutable
#373758 ·published 2007-02-26 23:51 UTC
rendered paste body
Index: 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())