Index: amarok-1.4.9.1/amarok/src/magnatunebrowser/magnatunebrowser.cpp =================================================================== --- amarok-1.4.9.1.orig/amarok/src/magnatunebrowser/magnatunebrowser.cpp 2008-08-14 13:57:10.000000000 -0400 +++ amarok-1.4.9.1/amarok/src/magnatunebrowser/magnatunebrowser.cpp 2008-08-14 14:01:10.000000000 -0400 @@ -27,6 +27,7 @@ #include //locate() #include #include //multiTabBar icons +#include #include #include @@ -373,11 +374,9 @@ KIO::StoredTransferJob* const storedJob = static_cast( downLoadJob ); QString list = QString( storedJob->data() ); - - QFile file( "/tmp/album_info.xml" ); - - if ( file.exists() ) - file.remove(); + KTempFile tfile; + m_tempFileName = tfile.name(); + QFile file( m_tempFileName ); if ( file.open( IO_WriteOnly ) ) { @@ -387,7 +386,7 @@ } - MagnatuneXmlParser * parser = new MagnatuneXmlParser( "/tmp/album_info.xml" ); + MagnatuneXmlParser * parser = new MagnatuneXmlParser( m_tempFileName ); connect( parser, SIGNAL( doneParsing() ), SLOT( doneParsing() ) ); ThreadManager::instance() ->queueJob( parser ); @@ -446,9 +445,13 @@ void MagnatuneBrowser::doneParsing() { + DEBUG_BLOCK updateList(); updateGenreBox( ); updateList(); // stupid stupid hack.... + if( !QFile::remove( m_tempFileName ) ) + debug() << "Couldn't remove temp file at " << m_tempFileName << endl; + m_tempFileName = QString(); } void MagnatuneBrowser::updateGenreBox() Index: amarok-1.4.9.1/amarok/src/magnatunebrowser/magnatunebrowser.h =================================================================== --- amarok-1.4.9.1.orig/amarok/src/magnatunebrowser/magnatunebrowser.h 2008-08-14 13:57:10.000000000 -0400 +++ amarok-1.4.9.1/amarok/src/magnatunebrowser/magnatunebrowser.h 2008-08-14 14:02:12.000000000 -0400 @@ -244,6 +244,8 @@ bool m_purchaseInProgress; bool m_polished; + QString m_tempFileName; + KIO::TransferJob * m_listDownloadJob; };