diff --git a/src/musicscanner.cpp b/src/musicscanner.cpp index 710420f82..dc3602927 100644 --- a/src/musicscanner.cpp +++ b/src/musicscanner.cpp @@ -261,7 +261,9 @@ MusicScanner::listerFinished( const QMap& newmtimes ) m_filesToDelete << m_filemtimes[ key ].keys().first(); } commitBatch( m_scannedfiles, m_filesToDelete ); - + m_scannedfiles.clear(); + m_filesToDelete.clear(); + // remove obsolete / stale files foreach ( const QString& path, m_dirmtimes.keys() ) { diff --git a/src/scanmanager.cpp b/src/scanmanager.cpp index b5938314e..79b96f825 100644 --- a/src/scanmanager.cpp +++ b/src/scanmanager.cpp @@ -168,7 +168,8 @@ ScanManager::filesDeleted( const QStringList& files, const Tomahawk::collection_ { Q_UNUSED( files ); Q_UNUSED( collection ); - runDirScan( TomahawkSettings::instance()->scannerPaths(), true ); + if ( !TomahawkSettings::instance()->scannerPaths().isEmpty() ) + runDirScan( TomahawkSettings::instance()->scannerPaths(), true ); }