Merge lp:~manishsinha/dmedia/fix-cache-path-xdg into lp:~jderose/dmedia/get-on-da-bus

Status: Merged
Merged at revision: 132
Proposed branch: lp:~manishsinha/dmedia/fix-cache-path-xdg
Merge into: lp:~jderose/dmedia/get-on-da-bus
Diff against target: 14 lines (+2/-2)
1 file modified
dmedia (+2/-2)
To merge this branch: bzr merge lp:~manishsinha/dmedia/fix-cache-path-xdg
Reviewer Review Type Date Requested Status
Jason Gerard DeRose Approve
Review via email: mp+41967@code.launchpad.net

Commit message

Use xdg.BaseDirectory.xdg_cache_home instead of $HOME and .cache. Follow Freedesktop.org as much as possible

Description of the change

Use xdg.BaseDirectory.xdg_cache_home instead of $HOME and .cache. Follow Freedesktop.org as much as possible

To post a comment you must log in.
Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Another good catch, thanks. :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dmedia'
2--- dmedia 2010-11-21 20:48:27 +0000
3+++ dmedia 2010-11-26 17:17:55 +0000
4@@ -135,8 +135,8 @@
5 sys.exit('ERROR: not a directory: %r' % base)
6 extensions = frozenset(a.lower() for a in args[1:])
7
8-
9-cache = path.join(os.environ['HOME'], '.cache', 'dmedia')
10+xdg_cache_path = xdg.BaseDirectory.xdg_cache_home
11+cache = path.join(xdg_cache_path, 'dmedia')
12 if not path.exists(cache):
13 os.makedirs(cache)
14 if path.isdir(cache):

Subscribers

People subscribed via source and target branches