Make config and cache files conform to XDG

See http://standards.freedesktop.org/basedir-spec/latest/ for further
details.  This implementation decides the default based on whether a
file exists at the legacy location, if it doesn't, it picks the
XDG-conforming location instead.
This commit is contained in:
Vasilij Schneidermann 2015-06-02 09:12:45 +02:00
parent 8470b51a1d
commit 8bc1d37b3a
6 changed files with 67 additions and 18 deletions

View file

@ -429,9 +429,11 @@ DHT
~~~
aria2 supports mainline compatible DHT. By default, the routing table
for IPv4 DHT is saved to ``$HOME/.aria2/dht.dat`` and the routing
table for IPv6 DHT is saved to ``$HOME/.aria2/dht6.dat``. aria2 uses
same port number to listen on for both IPv4 and IPv6 DHT.
for IPv4 DHT is saved to ``$XDG_CACHE_HOME/aria2/dht.dat`` and the
routing table for IPv6 DHT is saved to
``$XDG_CACHE_HOME/aria2/dht6.dat`` unless files exist at
``$HOME/.aria2/dht.dat`` or ``$HOME/.aria2/dht6.dat``. aria2 uses same
port number to listen on for both IPv4 and IPv6 DHT.
UDP tracker
~~~~~~~~~~~