Commit 2cc1111e authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Cache result of libarchiveHasLzo

It is extremely slow (~100 ms on my machine) and hardly changes.
parent efd42d9e
Pipeline #143591 passed with stage
in 1 minute and 34 seconds
......@@ -122,8 +122,9 @@ QStringList PluginManager::supportedMimeTypes(MimeSortingMode mode) const
supported.remove(QStringLiteral("application/x-lz4-compressed-tar"));
}
static bool s_libarchiveHasLzo = libarchiveHasLzo();
// Remove entry for lzo-compressed tar if libarchive not linked against lzo and lzop executable not found in path.
if (!libarchiveHasLzo() && QStandardPaths::findExecutable(QStringLiteral("lzop")).isEmpty()) {
if (!s_libarchiveHasLzo && QStandardPaths::findExecutable(QStringLiteral("lzop")).isEmpty()) {
supported.remove(QStringLiteral("application/x-tzo"));
}
......
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