Mac datadir silliness

This commit is contained in:
Kiooeht 2011-07-10 04:26:48 -07:00
parent e5eafe854e
commit 6b4d15cdb2

View file

@ -535,11 +535,20 @@ class userConfig(object):
for dirname, dirnames, filenames in os.walk('themes'): for dirname, dirnames, filenames in os.walk('themes'):
for d in dirnames: for d in dirnames:
themes.append(d) 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() themes.sort()
return themes return themes
def availableProfiles(self): def availableProfiles(self):
profs = [] 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: for filename in filenames:
l = len(filename) l = len(filename)
if filename[l-3:l] == ".js": if filename[l-3:l] == ".js":