From 6b4d15cdb20df21e498ce3ef829f5bfb0cc4bd99 Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Sun, 10 Jul 2011 04:26:48 -0700 Subject: [PATCH] Mac datadir silliness --- pesterchum.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pesterchum.py b/pesterchum.py index fb690dd..ca50b6d 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -535,11 +535,20 @@ class userConfig(object): for dirname, dirnames, filenames in os.walk('themes'): for d in dirnames: themes.append(d) + if sys.platform == "darwin": + for dirname, dirnames, filenames in os.walk(_datadir+'themes'): + for d in dirnames: + if d not in themes: + themes.append(d) themes.sort() return themes def availableProfiles(self): profs = [] - for dirname, dirnames, filenames in os.walk('profiles'): + if sys.platform == "darwin": + profileloc = _datadir+'profiles' + else: + profileloc = 'profiles' + for dirname, dirnames, filenames in os.walk(profileloc): for filename in filenames: l = len(filename) if filename[l-3:l] == ".js":