Commit f980f6e6 authored by Alexander Stippich's avatar Alexander Stippich

Resolve symlink for file listener

Summary:
Always resolve symlink so that
Baloo indexer works

BUG: 410670
CCBUG: 407918

Test Plan:
remove actual music folder from search path
delete old database
create a symlink to your music folder
add symlink as search path
music is found with patch

Reviewers: mgallien, ngraham

Reviewed By: ngraham

Tags: #elisa

Differential Revision: https://phabricator.kde.org/D23240
parent 628e42a4
......@@ -108,11 +108,18 @@ void AbstractFileListing::restoredTracks(QHash<QUrl, QDateTime> allFiles)
void AbstractFileListing::setAllRootPaths(const QStringList &allRootPaths)
{
if (d->mAllRootPaths == allRootPaths) {
return;
//resolve symlinks
QStringList allPaths;
for (const auto &path : allRootPaths) {
QFileInfo newPath(path);
if (newPath.isSymLink()) {
allPaths << newPath.symLinkTarget();
} else {
allPaths << path;
}
}
d->mAllRootPaths = allRootPaths;
d->mAllRootPaths = allPaths;
}
void AbstractFileListing::databaseFinishedInsertingTracksList()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment