From eb64b14a17af1758ef5945e82679224269a12714 Mon Sep 17 00:00:00 2001 From: Ivan Date: Sat, 20 Nov 2021 02:32:34 +0200 Subject: [PATCH] Change user config path to match system-wide directory structure --- alc/alconfig.cpp | 8 ++++---- alsoftrc.sample | 2 +- utils/alsoft-config/mainwindow.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/alc/alconfig.cpp b/alc/alconfig.cpp index 60cb4dafd7..6eb7f8edf4 100644 --- a/alc/alconfig.cpp +++ b/alc/alconfig.cpp @@ -440,8 +440,8 @@ void ReadALConfig() if(auto configdir = al::getenv("XDG_CONFIG_HOME")) { fname = *configdir; - if(fname.back() != '/') fname += "/alsoft.conf"; - else fname += "alsoft.conf"; + if(fname.back() != '/') fname += "/openal/alsoft.conf"; + else fname += "openal/alsoft.conf"; } else { @@ -449,8 +449,8 @@ void ReadALConfig() if(auto homedir = al::getenv("HOME")) { fname = *homedir; - if(fname.back() != '/') fname += "/.config/alsoft.conf"; - else fname += ".config/alsoft.conf"; + if(fname.back() != '/') fname += "/.config/openal/alsoft.conf"; + else fname += ".config/openal/alsoft.conf"; } } if(!fname.empty()) diff --git a/alsoftrc.sample b/alsoftrc.sample index 80bab07cdf..aa2bd8e434 100644 --- a/alsoftrc.sample +++ b/alsoftrc.sample @@ -15,7 +15,7 @@ # Options marked as "(global)" are not influenced by the device. # # The system-wide settings can be put in /etc/openal/alsoft.conf and user- -# specific override settings in $HOME/.alsoftrc. +# specific override settings in $HOME/.alsoftrc or $XDG_CONFIG_HOME/openal/alsoft.conf (~/.config/openal/alsoft.conf). # For Windows, these settings should go into $AppData\alsoft.ini # # Option and block names are case-senstive. The supplied values are only hints diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index 758596450a..78483bef5b 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -153,7 +153,7 @@ static QString getDefaultConfigName() }; QString base = get_appdata_path(); #else - static const char fname[] = "alsoft.conf"; + static const char fname[] = "openal/alsoft.conf"; QByteArray base = qgetenv("XDG_CONFIG_HOME"); if(base.isEmpty()) {