changeset 3475:80cff88ad6d0 trunk

Default extension may not be xspf
author Kieran Clancy <clancy.kieran+audacious@gmail.com>
date Mon, 10 Sep 2007 13:46:37 +0930
parents adc785ee517b
children 9152829f3c19
files src/audacious/ui_playlist.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_playlist.c	Mon Sep 10 13:45:41 2007 +0930
+++ b/src/audacious/ui_playlist.c	Mon Sep 10 13:46:37 2007 +0930
@@ -53,6 +53,7 @@
 #include "ui_main.h"
 #include "ui_manager.h"
 #include "util.h"
+#include "config.h"
 
 #include "ui_skinned_window.h"
 #include "ui_skinned_button.h"
@@ -949,12 +950,16 @@
         playlist_file_selection_save(_("Save Playlist"), default_filename);
 
     if (filename) {
-        /* Default to xspf if no filename has extension */
+        /* Default extension */
         basename = g_path_get_basename(filename);
         dot = strrchr(basename, '.');
         if( dot == NULL || dot == basename) {
             gchar *oldname = filename;
+#ifdef HAVE_XSPF_PLAYLIST
             filename = g_strconcat(oldname, ".xspf", NULL);
+#else
+            filename = g_strconcat(oldname, ".m3u", NULL);
+#endif
             g_free(oldname);
         }
         g_free(basename);