The breakage was getting in my way enough to patch over it.
This isn't a proper fix, but it has more commentry it in, and it
stops Audacious chewing disk space, at least for me.

Having looked again at line 211, it seems OK.  This patches the
other two bits (and I've updated my copy of the source to
1.5.1-3).

Steve
--- old-audacious-1.5.1/src/audacious/playlist.c	2008-07-28 17:09:35.000000000 +0100
+++ new-audacious-1.5.1/src/audacious/playlist.c	2008-07-28 17:09:35.000000000 +0100
@@ -2429,9 +2429,28 @@
                     /* Entry disappeared while we looked it up.
                        Restart. */
                     node = playlist->entries;
+                /*
                 else if ((entry->tuple != NULL || entry->title != NULL) && 
                          tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 &&
                          tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1)
+                */
+                /* Lets unpick that conditional.
+                 * Assume entry->tuple != NULL:
+                 *   it's (( TRUE || ignored ) && test && test)
+                 * Assume entry->tuple == NULL:
+                 *   both tuple_get_int calls return 0,
+                 *   and it's (( FALSE || entry->title != NULL) && TRUE && TRUE)
+                 *   which reduces to (entry->title != NULL)
+                 */
+                /* FIXME: this code is a refactoring of code that's known to be wrong
+                 * by someone who doesn't understand what it's meant to do.
+                 * If you know what it's meant to do, please fix it.
+                 * (Debian BTS http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491655 )
+                 */
+                else if ((entry->title != NULL) ||
+                         (entry->tuple != NULL &&
+                         tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 &&
+                         tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1))
                 {
                     update_playlistwin = TRUE;
                     break; /* hmmm... --asphyx */
@@ -2480,9 +2499,15 @@
                         node = g_list_nth(playlist->entries,
                                           playlistwin_get_toprow());
                 }
-                else if ((entry->tuple != NULL || entry->title != NULL) && 
+                /* FIXME: this code is a refactoring of code that's known to be wrong
+                 * by someone who doesn't understand what it's meant to do.
+                 * If you know what it's meant to do, please fix it.
+                 * (Debian BTS http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491655 )
+                 */
+                else if ((entry->title != NULL) ||
+                         (entry->tuple != NULL &&
                          tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 &&
-                         tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) {
+                         tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1)) {
                     update_playlistwin = TRUE;
                 }
             }

Reply via email to