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
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