summaryrefslogtreecommitdiff
blob: 80cdad0c9a078a41346e70058d803e70f276784a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/blueman/plugins/config/File.py b/blueman/plugins/config/File.py
index c5414c5..9a9e156 100644
--- a/blueman/plugins/config/File.py
+++ b/blueman/plugins/config/File.py
@@ -37,7 +37,12 @@ signal.signal(signal.SIGHUP, sighandler)
 
 dbus.service.Object.SUPPORTS_MULTIPLE_OBJECT_PATHS = True
 
-cfg_path = os.path.expanduser('~/.config/blueman/blueman.cfg')
+cfg_dir = os.path.expanduser('~/.config/blueman')
+
+if os.environ.has_key('XDG_CONFIG_HOME'):
+	cfg_dir = '%s/blueman' % os.environ['XDG_CONFIG_HOME']
+
+cfg_path = '%s/blueman.cfg' % cfg_dir
 
 class Monitor(dbus.service.Object):
 	__id__ = 0
@@ -89,9 +94,9 @@ class File(ConfigPlugin):
 	def on_load(self, section):
 		
 		if not File.__db__:
-			if not os.path.exists(os.path.expanduser('~/.config/blueman')):
+			if not os.path.exists(os.path.expanduser(cfg_dir)):
 				try:
-					os.makedirs(os.path.expanduser('~/.config/blueman'))
+					os.makedirs(os.path.expanduser(cfg_dir))
 				except:
 					pass
 			try: