mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-21 16:31:58 +02:00
Fix missing condition, wrong method, and put more info in the ChangeLog
This commit is contained in:
parent
2214b750be
commit
01f2fe6adc
@ -1,7 +1,10 @@
|
||||
Version 0.1.0:
|
||||
* Watch folders for changes and automatically update your collection. This
|
||||
is on by default; you can turn it off on the Local Music tab in the
|
||||
settings dialog.
|
||||
settings dialog. Note that this triggers only on files or folders being
|
||||
added to or removed from folders; it is not watch individual files as
|
||||
most OSes can't support enough file watches to handle a normal-sized
|
||||
music collection.
|
||||
|
||||
Version 0.0.3:
|
||||
* Fix crashes in Twitter authentication. For reals now.
|
||||
|
@ -40,7 +40,7 @@ DirLister::go()
|
||||
void
|
||||
DirLister::scanDir( QDir dir, int depth, DirLister::Mode mode )
|
||||
{
|
||||
qDebug() << "DirLister::scanDir scanning: " << dir.absolutePath();
|
||||
qDebug() << "DirLister::scanDir scanning: " << dir.absolutePath() << " with mode " << mode;
|
||||
QFileInfoList dirs;
|
||||
const uint mtime = QFileInfo( dir.absolutePath() ).lastModified().toUTC().toTime_t();
|
||||
m_newdirmtimes.insert( dir.absolutePath(), mtime );
|
||||
@ -49,9 +49,9 @@ DirLister::scanDir( QDir dir, int depth, DirLister::Mode mode )
|
||||
{
|
||||
// dont scan this dir, unchanged since last time.
|
||||
}
|
||||
else
|
||||
else if( mode != DirLister::MTimeOnly )
|
||||
{
|
||||
if ( m_dirmtimes.contains( dir.absolutePath() ) )
|
||||
if( m_dirmtimes.contains( dir.absolutePath() ) )
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( new DatabaseCommand_DeleteFiles( dir, SourceList::instance()->getLocal() ) ) );
|
||||
|
||||
dir.setFilter( QDir::Files | QDir::Readable | QDir::NoDotAndDotDot );
|
||||
@ -64,10 +64,10 @@ DirLister::scanDir( QDir dir, int depth, DirLister::Mode mode )
|
||||
}
|
||||
dir.setFilter( QDir::Dirs | QDir::Readable | QDir::NoDotAndDotDot );
|
||||
dirs = dir.entryInfoList();
|
||||
|
||||
|
||||
foreach( const QFileInfo& di, dirs )
|
||||
{
|
||||
if( mode == DirLister::Recursive || !m_dirmtimes.contains( di.absolutePath() ) )
|
||||
if( mode == DirLister::Recursive || !m_dirmtimes.contains( di.absoluteFilePath() ) )
|
||||
scanDir( di.absoluteFilePath(), depth + 1, DirLister::Recursive );
|
||||
else //should be the non-recursive case since the second test above should only happen with a new dir
|
||||
scanDir( di.absoluteFilePath(), depth + 1, DirLister::MTimeOnly );
|
||||
|
Loading…
x
Reference in New Issue
Block a user