From 55c4d7686a24e60296e7ea7f165a6ac9fca80418 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Mon, 28 Jul 2014 23:32:25 +0200
Subject: [PATCH] Add Haiku-specific user paths

---
 weboob/core/ouiboube.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/weboob/core/ouiboube.py b/weboob/core/ouiboube.py
index 4e94ea3..4e7c18d 100644
--- a/weboob/core/ouiboube.py
+++ b/weboob/core/ouiboube.py
@@ -340,6 +340,8 @@ class Weboob(WebNip):
         if workdir is None:
             if 'WEBOOB_WORKDIR' in os.environ:
                 workdir = os.environ['WEBOOB_WORKDIR']
+            elif sys.platform[:5] == 'haiku':
+                workdir = os.path.join(os.environ.get('XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), 'config', 'settings')), 'weboob')
             else:
                 workdir = os.path.join(os.environ.get('XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), '.config')), 'weboob')
 
@@ -352,6 +354,8 @@ class Weboob(WebNip):
                 datadir = os.environ['WEBOOB_DATADIR']
             elif 'WEBOOB_WORKDIR' in os.environ:
                 datadir = os.environ['WEBOOB_WORKDIR']
+            elif sys.platform[:5] == 'haiku':
+                datadir = os.path.join(os.environ.get('XDG_DATA_HOME', os.path.join(os.path.expanduser('~'), 'config', 'non-packaged', 'data')), 'weboob')
             else:
                 datadir = os.path.join(os.environ.get('XDG_DATA_HOME', os.path.join(os.path.expanduser('~'), '.local', 'share')), 'weboob')
 
-- 
2.2.2

