[libdvdcss-devel] Fwd: [VLC] #4289: Make libdvdcss follow XDG on UNIX systems for folder path

Rémi Denis-Courmont rem at videolan.org
Wed Nov 3 18:55:38 CET 2010


Forwarding bug report for your information.

The reporter-provided patch is: 
http://trac.videolan.org/vlc/attachment/ticket/4289/libdvdcss_xdg.patch

#4289: Make libdvdcss follow XDG on UNIX systems for folder path
-------------------------+--------------------------------------------------
 Reporter:  Ángel        |        Owner:  courmisch    
     Type:  patch        |       Status:  new          
 Priority:  normal       |    Milestone:  Bugs paradize
Component:  Access       |      Version:  master       
 Severity:  normal       |     Keywords:               
 Platform:  all          |   Difficulty:  unknown      
      Wip:  Not started  |  
-------------------------+--------------------------------------------------
 Currently libdvdcss uses $HOME/.dvdcss as cache folder or $DVDCSS_CACHE.

 Please make it follow the XDG Base Directory Specification [1].
 This means placing dvdcss cache inside $XDG_CACHE_HOME folder with
 $XDG_CACHE_HOME as $HOME/.cache if unset.

 The enclosed patch changes the cache folder to the following:
 1. $DVDCSS_CACHE
 2. $XDG_CACHE_HOME/dvdcss
 3. $HOME/.dvdcss (if existing)
 4. $HOME/.cache/dvdcss

 It's basically XDG but keeping the old location in order not to waste
 whatever contents are already there (alternatively, it could be moved on
 first run). That fallback location could be removed in the future.

 I gave $XDG_CACHE_HOME an higher priority considering that, as opposed to
 someone which is indifferent and just get everything at .cache for the
 default, if the user sets $XDG_CACHE_HOME it has a good reason and should
 be followed no matter if $HOME/.dvdcsss is there (eg. home is nfs mounted
 and $XDG_CACHE_HOME points to a local disk).

 Patch attached. Best viewed with -w to skip the added indentation.

 1 - http://standards.freedesktop.org/basedir-spec/latest/index.html

-- 
Ticket URL: <http://trac.videolan.org/vlc/ticket/4289>
VLC <http://www.videolan.org/vlc/>
VLC media player

-- 
Rémi Denis-Courmont
Default assignee for VLC bugs


More information about the libdvdcss-devel mailing list