Bug 139460 - amarok script manager do not handle dots in script's name
Summary: amarok script manager do not handle dots in script's name
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.4
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-01 07:46 UTC by Gioele Barabucci
Modified: 2007-01-03 00:13 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 Gioele Barabucci 2007-01-01 07:46:31 UTC
Version:           1.4.4 (using KDE 3.5.5, Gentoo)
Compiler:          Target: powerpc-unknown-linux-gnu
OS:                Linux (ppc) release 2.6.19-gentoo-r2

If a script have a dot in its name, its .spec file will not read.

Probably because amarok splits foo.org.rb in foo,org.rb and searches for foo.spec instead of foo.org,rb and foo.org.spec.
Comment 1 Martin Aumueller 2007-01-03 00:13:05 UTC
SVN commit 619194 by aumuell:

assume that only the last dot of a script executable is not part of the script name
BUG: 139460


 M  +2 -0      ChangeLog  
 M  +2 -2      src/scriptmanager.cpp  


--- trunk/extragear/multimedia/amarok/ChangeLog #619193:619194
@@ -87,6 +87,8 @@
     * Amarok now saves playlists with relative paths by default.
 
   BUGFIXES:
+    * Assume that all dots but the last in script executable files belong to
+      the script name. (BR 139460)
     * Don't crash when quitting while initially loading the playlist.
       (BR 136353)
     * The same track could be queued multiple times for transferring to a
--- trunk/extragear/multimedia/amarok/src/scriptmanager.cpp #619193:619194
@@ -279,7 +279,7 @@
     if( !m_scripts.contains( name ) )
         return QString::null;
     QFileInfo info( m_scripts[name].url.path() );
-    const QString specPath = info.dirPath() + '/' + info.baseName() + ".spec";
+    const QString specPath = info.dirPath() + '/' + info.baseName( true ) + ".spec";
 
     return specPath;
 }
@@ -843,7 +843,7 @@
         // Read and parse .spec file, if exists
         QFileInfo info( path );
         KListViewItem* li = 0;
-        const QString specPath = info.dirPath() + '/' + info.baseName() + ".spec";
+        const QString specPath = info.dirPath() + '/' + info.baseName( true ) + ".spec";
         if( QFile::exists( specPath ) ) {
             KConfig spec( specPath, true, false );
             if( spec.hasKey( "name" ) )