summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-09-25 03:01:32 +0200
committermathieui <mathieui@mathieui.net>2011-09-25 03:01:32 +0200
commit00ed9b4842169111238b86d0bfc1465176b7d2d8 (patch)
treee773f9a32169a995eca683759d1feef6aa165cc2 /src
parentfd99fb32bb6d696af9d792d2d6ea69bfe610501f (diff)
downloadpoezio-00ed9b4842169111238b86d0bfc1465176b7d2d8.tar.gz
poezio-00ed9b4842169111238b86d0bfc1465176b7d2d8.tar.bz2
poezio-00ed9b4842169111238b86d0bfc1465176b7d2d8.tar.xz
poezio-00ed9b4842169111238b86d0bfc1465176b7d2d8.zip
[teisenbe] Fix a bug in case of XDG_CONFIG_HOME not set
Diffstat (limited to 'src')
-rw-r--r--src/plugin_manager.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugin_manager.py b/src/plugin_manager.py
index 0ffee7ee..1f0e89eb 100644
--- a/src/plugin_manager.py
+++ b/src/plugin_manager.py
@@ -10,8 +10,10 @@ plugins_dir = plugins_dir or\
os.path.join(os.environ.get('HOME'), '.local', 'share'),
'poezio', 'plugins')
-plugins_conf_dir = os.path.join(os.environ.get('XDG_CONFIG_HOME'), 'poezio',\
- 'plugins')
+config_home = os.environ.get("XDG_CONFIG_HOME")
+if not config_home:
+ config_home = os.path.join(os.environ.get('HOME'), '.config')
+plugins_conf_dir = os.path.join(config_home, 'poezio', 'plugins')
try:
os.makedirs(plugins_dir)
@@ -23,7 +25,6 @@ try:
except OSError:
pass
-
sys.path.append(plugins_dir)
class PluginManager(object):