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

Proposed by Mike McCracken on 2012-07-30
Status: Merged
Approved by: dobey on 2012-08-01
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 on 2012-08-01
Alejandro J. Cura (community) 2012-07-30 Approve on 2012-08-01
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.
Alejandro J. Cura (alecu) wrote :

Looks good.

review: Approve
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dirspec/utils.py'
2--- dirspec/utils.py 2012-07-18 22:44:13 +0000
3+++ dirspec/utils.py 2012-07-30 22:35:20 +0000
4@@ -165,6 +165,16 @@
5 default_data_path = os.path.join(default_config_path, b'xdg')
6 default_data_home = os.path.join(default_config_home, b'xdg')
7 default_cache_home = os.path.join(default_data_home, b'cache')
8+elif sys.platform == 'darwin':
9+ user_home = os.path.expanduser(b'~')
10+ default_cache_home = os.path.join(user_home, b'Library', b'Caches')
11+ default_config_path = b'/Library/Preferences:/etc/xdg'
12+ default_config_home = os.path.join(user_home, b'Library', b'Preferences')
13+ default_data_path = b':'.join([b'/Library/Application Support',
14+ b'/usr/local/share',
15+ b'/usr/share'])
16+ default_data_home = os.path.join(user_home, b'Library',
17+ b'Application Support')
18 else:
19 user_home = os.path.expanduser(b'~')
20 default_cache_home = os.path.join(user_home,

Subscribers

People subscribed via source and target branches