Fixed Debian packaged configs being checked before user configs (#296)
This commit is contained in:
@@ -106,10 +106,7 @@ namespace SwayNotificationCenter {
|
||||
|
||||
public static string get_style_path (owned string ? custom_path,
|
||||
bool only_system = false) {
|
||||
string[] paths = {
|
||||
// Fallback location. Specified in postinstall.py
|
||||
"/usr/local/etc/xdg/swaync/style.css"
|
||||
};
|
||||
string[] paths = {};
|
||||
if (custom_path != null && custom_path.length > 0) {
|
||||
// Replaces the home directory relative path with a absolute path
|
||||
if (custom_path.get (0) == '~') {
|
||||
@@ -127,6 +124,11 @@ namespace SwayNotificationCenter {
|
||||
paths += Path.build_path (Path.DIR_SEPARATOR.to_string (),
|
||||
path, "swaync/style.css");
|
||||
}
|
||||
// Fallback location. Specified in postinstall.py. Mostly for Debian
|
||||
paths += "/usr/local/etc/xdg/swaync/style.css";
|
||||
|
||||
info ("Looking for CSS file in these directories:\n\t- %s",
|
||||
string.joinv ("\n\t- ", paths));
|
||||
|
||||
string path = "";
|
||||
foreach (string try_path in paths) {
|
||||
@@ -144,10 +146,7 @@ namespace SwayNotificationCenter {
|
||||
}
|
||||
|
||||
public static string get_config_path (owned string ? custom_path) {
|
||||
string[] paths = {
|
||||
// Fallback location. Specified in postinstall.py
|
||||
"/usr/local/etc/xdg/swaync/config.json"
|
||||
};
|
||||
string[] paths = {};
|
||||
if (custom_path != null && (custom_path = custom_path.strip ()).length > 0) {
|
||||
// Replaces the home directory relative path with a absolute path
|
||||
if (custom_path.get (0) == '~') {
|
||||
@@ -167,6 +166,11 @@ namespace SwayNotificationCenter {
|
||||
paths += Path.build_path (Path.DIR_SEPARATOR.to_string (),
|
||||
path, "swaync/config.json");
|
||||
}
|
||||
// Fallback location. Specified in postinstall.py. Mostly for Debian
|
||||
paths += "/usr/local/etc/xdg/swaync/config.json";
|
||||
|
||||
info ("Looking for config file in these directories:\n\t- %s",
|
||||
string.joinv ("\n\t- ", paths));
|
||||
|
||||
string path = "";
|
||||
foreach (string try_path in paths) {
|
||||
|
Reference in New Issue
Block a user