Merge lp:~dobey/dirspec/update-4-0 into lp:dirspec/stable-4-0

Proposed by dobey
Status: Merged
Approved by: Roberto Alsina
Approved revision: no longer in the source branch.
Merged at revision: 11
Proposed branch: lp:~dobey/dirspec/update-4-0
Merge into: lp:dirspec/stable-4-0
Diff against target: 20 lines (+10/-0)
1 file modified
dirspec/utils.py (+10/-0)
To merge this branch: bzr merge lp:~dobey/dirspec/update-4-0
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Review via email: mp+120443@code.launchpad.net

Commit message

[Mike McCracken]

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

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) :
review: Approve
lp:~dobey/dirspec/update-4-0 updated
11. By dobey

[Mike McCracken]

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

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-08-20 18:07:28 +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

to all changes: