Improve path extension handling

PR #16867.
This commit is contained in:
Vladimir Golovnev
2022-04-14 09:43:07 +03:00
committed by GitHub
parent 669b67e666
commit 7377974731
5 changed files with 16 additions and 15 deletions

View File

@@ -392,8 +392,7 @@ void SearchPluginManager::pluginDownloadFinished(const Net::DownloadResult &resu
{
const Path filePath = result.filePath;
Path pluginPath {QUrl(result.url).path()};
pluginPath.removeExtension(); // Remove extension
const auto pluginPath = Path(QUrl(result.url).path()).removedExtension();
installPlugin_impl(pluginPath.filename(), filePath);
Utils::Fs::removeFile(filePath);
}