mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-18 03:41:27 +02:00
* Fixed mtimes issue with windows paths.
This commit is contained in:
@@ -36,7 +36,8 @@ DatabaseCommand_DirMtimes::exec( DatabaseImpl* dbi )
|
|||||||
void
|
void
|
||||||
DatabaseCommand_DirMtimes::execSelect( DatabaseImpl* dbi )
|
DatabaseCommand_DirMtimes::execSelect( DatabaseImpl* dbi )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << m_prefix << m_update;
|
QDir dir( m_prefix );
|
||||||
|
qDebug() << Q_FUNC_INFO << dir.absolutePath() << m_update;
|
||||||
QMap<QString,unsigned int> mtimes;
|
QMap<QString,unsigned int> mtimes;
|
||||||
TomahawkSqlQuery query = dbi->newquery();
|
TomahawkSqlQuery query = dbi->newquery();
|
||||||
|
|
||||||
@@ -49,15 +50,12 @@ DatabaseCommand_DirMtimes::execSelect( DatabaseImpl* dbi )
|
|||||||
query.prepare( QString( "SELECT name, mtime "
|
query.prepare( QString( "SELECT name, mtime "
|
||||||
"FROM dirs_scanned "
|
"FROM dirs_scanned "
|
||||||
"WHERE name LIKE :prefix" ) );
|
"WHERE name LIKE :prefix" ) );
|
||||||
query.bindValue( ":prefix", m_prefix + "%" );
|
|
||||||
|
|
||||||
qDebug() << query.lastQuery();
|
query.bindValue( ":prefix", dir.absolutePath() + "%" );
|
||||||
query.exec();
|
query.exec();
|
||||||
qDebug() << query.lastQuery();
|
|
||||||
}
|
}
|
||||||
while( query.next() )
|
while( query.next() )
|
||||||
{
|
{
|
||||||
qDebug() << query.value( 0 ).toString();
|
|
||||||
mtimes.insert( query.value( 0 ).toString(), query.value( 1 ).toUInt() );
|
mtimes.insert( query.value( 0 ).toString(), query.value( 1 ).toUInt() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ class DLLEXPORT DatabaseCommand_DirMtimes : public DatabaseCommand
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DatabaseCommand_DirMtimes( const QString& prefix = "", QObject* parent = 0 )
|
explicit DatabaseCommand_DirMtimes( const QString& prefix = QString(), QObject* parent = 0 )
|
||||||
: DatabaseCommand( parent ), m_prefix( prefix ), m_update( false )
|
: DatabaseCommand( parent ), m_prefix( prefix ), m_update( false )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user