1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 22:26:32 +02:00

* Prevent watch for changes interfering with running scan.

This commit is contained in:
Christian Muehlhaeuser
2011-11-11 19:46:44 +01:00
parent 8e742a06d9
commit 011ece182f

View File

@@ -135,6 +135,8 @@ ScanManager::runScan( bool manualFull )
if ( !Database::instance() || ( Database::instance() && !Database::instance()->isReady() ) )
return;
if ( !m_musicScannerThreadController && m_scanner.isNull() ) //still running if these are not zero
{
if ( manualFull )
{
DatabaseCommand_DeleteFiles *cmd = new DatabaseCommand_DeleteFiles( SourceList::instance()->getLocal() );
@@ -150,7 +152,12 @@ ScanManager::runScan( bool manualFull )
SLOT( fileMtimesCheck( const QMap< QString, QMap< unsigned int, unsigned int > >& ) ) );
Database::instance()->enqueue( QSharedPointer< DatabaseCommand >( cmd ) );
}
else
{
qDebug() << "Could not run dir scan, old scan still running";
return;
}
}