[Xfce4-commits] <parole:master> Remove empty playlist files

Sean Davis noreply at xfce.org
Fri Oct 11 11:52:33 CEST 2013


Updating branch refs/heads/master
         to f6c28682248152abf58a88f7a5c269285c7ae7e4 (commit)
       from 080c0cc842363c01880d8ebc91be73ceb6ff1cd5 (commit)

commit f6c28682248152abf58a88f7a5c269285c7ae7e4
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Sep 22 06:55:04 2013 -0400

    Remove empty playlist files

 src/parole-medialist.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/parole-medialist.c b/src/parole-medialist.c
index f309d47..bd7a512 100644
--- a/src/parole-medialist.c
+++ b/src/parole-medialist.c
@@ -2075,6 +2075,11 @@ void parole_media_list_save_list (ParoleMediaList *list)
             parole_pl_parser_save_from_files (fileslist, history, PAROLE_PL_FORMAT_M3U);
             g_slist_foreach (fileslist, (GFunc) g_object_unref, NULL);
         }
+        else
+        {
+            // If the playlist is empty, delete the list.
+            remove(history);
+        }
         g_slist_free (fileslist);
     }
 }


More information about the Xfce4-commits mailing list