[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: extragear/multimedia/amarok/src/databaseimporter/amarok14
From:       Alex Merry <kde () randomguy3 ! me ! uk>
Date:       2008-10-26 11:03:57
Message-ID: 200810261104.02748.kde () randomguy3 ! me ! uk
[Download RAW message or body]


On Sunday 26 October 2008 06:30:10 Seb Ruiz wrote:
> SVN commit 875963 by seb:
>
> Copy cached artwork from Amarok 1.4 to Amarok 2. This uses a pretty hackish
> method to find the old images: find Amarok 2 save directory, then switch
> .kde4 with .kde. Better suggestions anyone?

> +    QString newCoverPath = Amarok::saveLocation( "albumcovers/large/" );
> +    QString oldCoverPath = QString( newCoverPath );
> +    oldCoverPath = oldCoverPath.replace( ".kde4", ".kde" );
> +    QDir newCoverDir( newCoverPath );
> +    QDir oldCoverDir( oldCoverPath );

Maybe there should be a check in here for oldCoverDir == newCoverDir (after 
resolving symlinks) and for !oldCoverDir.exists().  It seems to me that those 
are the two most common failure cases, but there will be no feedback in the 
latter case, and in the former you'll just get lots of "Couldn't copy image" 
errors.

Alex


-- 
Proud KDE hacker: http://www.kde.org
Get KDE 4.1 - out now!


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic