From bdfda460e67a57d4976a35ddc752b3c7c1352b0d Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 18 Dec 2018 10:31:17 +0100 Subject: [PATCH] Vfs plugins: Available plugins must load A plugin that can't be loaded due to dependency issues should not be considered as available. --- src/common/vfs.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/common/vfs.cpp b/src/common/vfs.cpp index a1ad02efe..4f3b6fadc 100644 --- a/src/common/vfs.cpp +++ b/src/common/vfs.cpp @@ -107,6 +107,13 @@ bool OCC::isVfsPluginAvailable(Vfs::Mode mode) return false; } + // Attempting to load the plugin is essential as it could have dependencies that + // can't be resolved and thus not be available after all. + if (!loader.load()) { + qCWarning(lcPlugin) << "Plugin failed to load:" << loader.errorString(); + return false; + } + return true; } -- 2.30.2