Skip to content

Commit

Permalink
fix purge tracks on windows
Browse files Browse the repository at this point in the history
Again we should change the API here to accept
QDir instead of a QString.
  • Loading branch information
kain88-de committed Jan 18, 2014
1 parent 2012e55 commit 55437a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/library/dao/trackdao.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <QtDebug>
#include <QDir>
#include <QtSql>

#include "library/dao/trackdao.h"
Expand Down Expand Up @@ -711,7 +712,7 @@ void TrackDAO::purgeTracks(const QString& dir) {
// Capture entries that start with the directory prefix dir.
// dir needs to end in a slash otherwise we might match other
// directories.
QString likeClause = escaper.escapeStringForLike(dir + "/", '%') + "%";
QString likeClause = escaper.escapeStringForLike(QDir(dir).absolutePath() + "/", '%') + "%";

query.prepare(QString("SELECT library.id FROM library INNER JOIN track_locations "
"ON library.location = track_locations.id "
Expand Down

0 comments on commit 55437a4

Please sign in to comment.