File size: 780 Bytes
559318d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/confuse.py b/confuse.py
index eb48488..52c472b 100644
--- a/confuse.py
+++ b/confuse.py
@@ -671,6 +671,8 @@ def config_dirs():
     if platform.system() == 'Darwin':
         paths.append(MAC_DIR)
         paths.append(UNIX_DIR_FALLBACK)
+        if 'XDG_CONFIG_DIRS' in os.environ:
+            paths.extend(os.environ['XDG_CONFIG_DIRS'].split(':'))
         if UNIX_DIR_VAR in os.environ:
             paths.append(os.environ[UNIX_DIR_VAR])
 
@@ -682,6 +684,8 @@ def config_dirs():
     else:
         # Assume Unix.
         paths.append(UNIX_DIR_FALLBACK)
+        if 'XDG_CONFIG_DIRS' in os.environ:
+            paths.extend(os.environ['XDG_CONFIG_DIRS'].split(':'))
         if UNIX_DIR_VAR in os.environ:
             paths.append(os.environ[UNIX_DIR_VAR])