Verified Commit 707762ed authored by Fushan Wen's avatar Fushan Wen
Browse files

wallpapers/image: fix potential dead loop in PackageFinder

When a symlink points to its parent folder, a dead loop can exist in
PackageFinder because it doesn't de-duplicate folder paths.
parent 2b993aa7
Pipeline #247204 passed with stage
in 6 minutes and 32 seconds
......@@ -42,6 +42,7 @@ void PackageFinder::run()
}
if (!QFile::exists(folderPath + QLatin1String("/metadata.desktop")) && !QFile::exists(folderPath + QLatin1String("/metadata.json"))) {
folders << folderPath;
return false;
}
......@@ -66,6 +67,7 @@ void PackageFinder::run()
return true;
}
folders << folderPath;
return false; // Not found
};
......
Supports Markdown
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