From 79297f54a2848554b44d715757355dda2652fd67 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 24 Feb 2018 12:07:09 +0100 Subject: [PATCH] DataPaths: Allow to override Plugins path with FALKON_PLUGIN_PATH env variable --- src/lib/app/datapaths.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/app/datapaths.cpp b/src/lib/app/datapaths.cpp index 15a71ded7..604260a83 100644 --- a/src/lib/app/datapaths.cpp +++ b/src/lib/app/datapaths.cpp @@ -118,6 +118,12 @@ void DataPaths::init() // We also allow to load data from Config path initAssetsIn(m_paths[Config].at(0)); + // If FALKON_PLUGIN_PATH is set, only load plugins from there + const QByteArray pluginPath = qgetenv("FALKON_PLUGIN_PATH"); + if (!pluginPath.isNull()) { + m_paths[Plugins] = QStringList{QString::fromLocal8Bit(pluginPath)}; + } + m_tmpdir.reset(new QTemporaryDir()); m_paths[Temp].append(m_tmpdir->path()); if (!m_tmpdir->isValid()) {