From c8e8d29243222e52bb30e123f2c7321a9f418995 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Thu, 19 Nov 2020 15:20:38 -0500
Subject: [PATCH 3/3] [PATCH]: Fix loading of OS-installed plugins.

---
 gajim/common/configpaths.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gajim/common/configpaths.py b/gajim/common/configpaths.py
index 0ac879314..f4418b020 100644
--- a/gajim/common/configpaths.py
+++ b/gajim/common/configpaths.py
@@ -47,7 +47,7 @@ def get_plugin_dirs() -> List[Path]:
         return [Path(_paths['PLUGINS_BASE']),
                 Path('/app/plugins')]
     return [Path(_paths['PLUGINS_BASE']),
-            Path(_paths['PLUGINS_USER'])]
+            Path(_paths['PLUGINS_USER'])] + ([Path(os.getenv('PLUGINS_OS'))] if os.getenv('PLUGINS_OS') and Path(os.getenv('PLUGINS_OS')).is_dir() else [])
 
 
 def get_paths(type_: PathType) -> Generator[Path, None, None]:
-- 
2.29.2