diff options
| author | Vasilij Schneidermann <v.schneidermann@gmail.com> | 2015-06-02 09:12:45 +0200 |
|---|---|---|
| committer | Vasilij Schneidermann <v.schneidermann@gmail.com> | 2015-06-02 15:54:27 +0200 |
| commit | 8bc1d37b3a0735daa817d3efafea25f6b12b1237 (patch) | |
| tree | 7908666d7ef0d4f144d8f5999e5beae536ee7ab8 /src/OptionHandlerFactory.cc | |
| parent | 8470b51a1d562a9e859c8532a1444fd13eedde57 (diff) | |
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.
Diffstat (limited to 'src/OptionHandlerFactory.cc')
| -rw-r--r-- | src/OptionHandlerFactory.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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<OptionHandler*> 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<OptionHandler*> 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<OptionHandler*> 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); |
