Merge lp:~mikemc/dirspec/add-darwin-paths-1026383 into lp:dirspec

Proposed by Mike McCracken
Status: Merged
Approved by: dobey
Approved revision: 12
Merged at revision: 13
Proposed branch: lp:~mikemc/dirspec/add-darwin-paths-1026383
Merge into: lp:dirspec
Diff against target: 20 lines (+10/-0)
1 file modified
dirspec/utils.py (+10/-0)
To merge this branch: bzr merge lp:~mikemc/dirspec/add-darwin-paths-1026383
Reviewer Review Type Date Requested Status
dobey (community) Approve
Alejandro J. Cura (community) Approve
Review via email: mp+117357@code.launchpad.net

Commit message

- Add darwin equivalents to XDG defaults. (LP: #1026383)

Description of the change

- Add darwin equivalents to XDG defaults. (LP: #1026383)

To post a comment you must log in.
Revision history for this message
Alejandro J. Cura (alecu) wrote :

Looks good.

review: Approve
Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dirspec/utils.py'
--- dirspec/utils.py 2012-07-18 22:44:13 +0000
+++ dirspec/utils.py 2012-07-30 22:35:20 +0000
@@ -165,6 +165,16 @@
165 default_data_path = os.path.join(default_config_path, b'xdg')165 default_data_path = os.path.join(default_config_path, b'xdg')
166 default_data_home = os.path.join(default_config_home, b'xdg')166 default_data_home = os.path.join(default_config_home, b'xdg')
167 default_cache_home = os.path.join(default_data_home, b'cache')167 default_cache_home = os.path.join(default_data_home, b'cache')
168elif sys.platform == 'darwin':
169 user_home = os.path.expanduser(b'~')
170 default_cache_home = os.path.join(user_home, b'Library', b'Caches')
171 default_config_path = b'/Library/Preferences:/etc/xdg'
172 default_config_home = os.path.join(user_home, b'Library', b'Preferences')
173 default_data_path = b':'.join([b'/Library/Application Support',
174 b'/usr/local/share',
175 b'/usr/share'])
176 default_data_home = os.path.join(user_home, b'Library',
177 b'Application Support')
168else:178else:
169 user_home = os.path.expanduser(b'~')179 user_home = os.path.expanduser(b'~')
170 default_cache_home = os.path.join(user_home,180 default_cache_home = os.path.join(user_home,

Subscribers

People subscribed via source and target branches