mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-10 17:35:00 -06:00
3_2_x mapping: [search engine] Remove python3 cache during updateNova()
This commit is contained in:
@@ -335,6 +335,8 @@ void SearchEngine::updateNova() {
|
||||
if (!search_dir.exists("engines")) {
|
||||
search_dir.mkdir("engines");
|
||||
}
|
||||
fsutils::removeDirRecursive(search_dir.absoluteFilePath("__pycache__"));
|
||||
|
||||
QFile package_file2(search_dir.absolutePath() + "/engines/__init__.py");
|
||||
package_file2.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
package_file2.close();
|
||||
@@ -372,13 +374,14 @@ void SearchEngine::updateNova() {
|
||||
removePythonScriptIfExists(filePath);
|
||||
QFile::copy(":/"+nova_folder+"/fix_encoding.py", filePath);
|
||||
}
|
||||
|
||||
if (nova_folder == "nova3") {
|
||||
else if (nova_folder == "nova3") {
|
||||
filePath = search_dir.absoluteFilePath("sgmllib3.py");
|
||||
removePythonScriptIfExists(filePath);
|
||||
QFile::copy(":/"+nova_folder+"/sgmllib3.py", filePath);
|
||||
}
|
||||
|
||||
QDir destDir(QDir(fsutils::searchEngineLocation()).absoluteFilePath("engines"));
|
||||
fsutils::removeDirRecursive(destDir.absoluteFilePath("__pycache__"));
|
||||
QDir shipped_subDir(":/"+nova_folder+"/engines/");
|
||||
QStringList files = shipped_subDir.entryList();
|
||||
foreach (const QString &file, files) {
|
||||
|
||||
Reference in New Issue
Block a user