Bug 250689 - Export *.m3u playlist ignores if the "relative path checkbox" is unchecked and always saves as relative path
Summary: Export *.m3u playlist ignores if the "relative path checkbox" is unchecked an...
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlists/Saved Playlists (show other bugs)
Version: 2.3.1.90
Platform: Ubuntu Linux
: NOR minor (vote)
Target Milestone: 2.4.0
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-09 19:00 UTC by melethron
Modified: 2010-10-28 20:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description melethron 2010-09-09 19:00:59 UTC
Version:           2.3.1.90 (using KDE 4.4.2) 
OS:                Linux

As the summary says.... The Bug is fully reproducible and also happens with 2.3.1 and 2.3.0. The file is also saved with relative path if you the box is checked (so the selection isnt "switched").

Also there aren't any changes for *.pls and *.xspf playlist. They are always saved with absolute path (although i dont know if pls and xspf is able to use relative path). 


(Btw: I'm new to Kubuntu and this is my first bugreport. Hope if done it right...)

Reproducible: Always

Steps to Reproduce:
Export a playlist as *.m3u with unchecked "relative path" checkbox ;-)



Actual Results:  
If the file is opened with a texteditor you'll see either a "./folder-X/file-Y" if the files are in a subdir of the folder with the playlistfile or a "../../folder-X/file-Y" if the dir needs to be changed.

Expected Results:  
The absolute path (for example: "/home/USER/music/file-Y")

OS: Linux (i686) release 2.6.32-24-generic
Compiler: cc
Comment 1 Martin Blumenstingl 2010-10-28 20:10:02 UTC
commit 12add82b47434268a01b36a5afce543cdacaa470
branch master
Author: Martin Blumenstingl <darklight.xdarklight@googlemail.com>
Date:   Thu Oct 28 20:08:23 2010 +0200

    Don't ignore the "use relative path" checkbox in the playlist export dialog.
    
    BUG: 250689

diff --git a/ChangeLog b/ChangeLog
index edc6ea3..f726069 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -50,6 +50,8 @@ VERSION 2.4-Beta 1
       pressing SHIFT while clicking the action will bypass trash.
 
   BUGFIXES:
+    * Don't ignore the "use relative path" checkbox in the playlist export dialog.
+      (BR 250689)
     * Fixed applet explorer getting stuck. (BR 253058)
     * Fixed Wikipedia applet header layout issues. (BR 215171)
     * Fixed truncated heading in albums applet. (BR 231001)
diff --git a/src/core-impl/playlists/types/file/PlaylistFileSupport.cpp b/src/core-impl/playlists/types/file/PlaylistFileSupport.cpp
index 8a1b745..c728b97 100644
--- a/src/core-impl/playlists/types/file/PlaylistFileSupport.cpp
+++ b/src/core-impl/playlists/types/file/PlaylistFileSupport.cpp
@@ -24,6 +24,7 @@
 #include "core-impl/playlists/types/file/pls/PLSPlaylist.h"
 #include "core-impl/playlists/types/file/m3u/M3UPlaylist.h"
 #include "statusbar/StatusBar.h"
+#include "amarokconfig.h"
 
 
 #include <KLocale>
@@ -177,7 +178,7 @@ exportPlaylistFile( const Meta::TrackList &list, const KUrl &path, const QList<i
     if ( playlist )
     {
         playlist->setQueue( queued );
-        result = playlist->save( path.path(), true );
+        result = playlist->save( path.path(), AmarokConfig::relativePlaylist() );
     }
     else
     {