Bug 132961 - fails to open a directory with parenthesis from tag editor
Summary: fails to open a directory with parenthesis from tag editor
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-25 11:19 UTC by richlv
Modified: 2006-10-16 17:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description richlv 2006-08-25 11:19:52 UTC
Version:           svn (using KDE KDE 3.5.4)
Installed from:    Slackware Packages
OS:                Linux

i was sure i reported this - but probably encountered some problems during reporting...

make a directory with parenthesis, place a music file there. add it to amarok playlist, open it's properties in the tag editor. click on the folder icon besides location field.

An error occurred while loading file:///mnt/net/whatever/VA/VA - French Reggae Ska 3 %25282002%2529:
The file or folder /mnt/net/whatever/VA/VA - French Reggae Ska 3 %282002%29 does not exist.

as can be seen, parenthesis are replaced by %28 & %29, and konqueror fails to open such a directory.
Comment 1 Andrew Turner 2006-10-16 17:07:01 UTC
Fixed in revision 596032.

Index: ChangeLog
===================================================================
--- ChangeLog   (revision 595854)
+++ ChangeLog   (working copy)
@@ -51,6 +51,8 @@
     * Show a proper tag dialog when viewing information for DAAP music shares.

   BUGFIXES:
+    * Fix loading directory in external browser in the tag editor when the path
+      contains parentheses. (BR 132961)
     * Stop scripts using a proxy when it's disabled in KDE. Patch by Felix Geyer
       <sniperbeamer_disc1@fobos.de>.
     * While playing Last.fm Streams, sometimes metadata wouldn't be updated
Index: src/app.cpp
===================================================================
--- src/app.cpp (revision 595854)
+++ src/app.cpp (working copy)
@@ -1184,11 +1184,8 @@

     bool invokeBrowser( const QString& url )
     {
-        const QString cmd = "%1 \"%2\"";
-        QString cleanUrl( url );
-        cleanUrl.replace( "(", "%28" ).replace( ")", "%29" );
-        int pid = KRun::runCommand( cmd.arg( AmarokConfig::externalBrowser(), cleanUrl ) );
-        return pid > 0;
+        //URL can be in whatever forms KURL::fromPathOrURL understands - ie most.
+        return KRun::run( AmarokConfig::externalBrowser(), KURL::List( KURL::fromPathOrURL( url ) ) ) > 0;
     }

     namespace ColorScheme