From 8bc1d37b3a0735daa817d3efafea25f6b12b1237 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Tue, 2 Jun 2015 09:12:45 +0200 Subject: 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. --- src/OptionHandlerFactory.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/OptionHandlerFactory.cc') diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index 768d8471..ea1fa3bf 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -174,7 +174,7 @@ std::vector OptionHandlerFactory::createOptionHandlers() OptionHandler* op(new DefaultOptionHandler (PREF_CONF_PATH, TEXT_CONF_PATH, - util::getHomeDir()+"/.aria2/aria2.conf", + util::getConfigFile(), PATH_TO_FILE)); op->addTag(TAG_ADVANCED); handlers.push_back(op); @@ -2043,7 +2043,7 @@ std::vector OptionHandlerFactory::createOptionHandlers() OptionHandler* op(new DefaultOptionHandler (PREF_DHT_FILE_PATH, TEXT_DHT_FILE_PATH, - util::getHomeDir()+"/.aria2/dht.dat", + util::getDHTFile(false), PATH_TO_FILE)); op->addTag(TAG_BITTORRENT); handlers.push_back(op); @@ -2052,7 +2052,7 @@ std::vector OptionHandlerFactory::createOptionHandlers() OptionHandler* op(new DefaultOptionHandler (PREF_DHT_FILE_PATH6, TEXT_DHT_FILE_PATH6, - util::getHomeDir()+"/.aria2/dht6.dat", + util::getDHTFile(true), PATH_TO_FILE)); op->addTag(TAG_BITTORRENT); handlers.push_back(op); -- cgit