From 908203adc974d458c48b19f846072eacc75b6638 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Mon, 19 Jan 2015 20:07:42 +0100 Subject: [PATCH] config: pick up fallback config file from system data dirs --- src/config.vala | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/config.vala b/src/config.vala index 079423c..8c07ab4 100644 --- a/src/config.vala +++ b/src/config.vala @@ -28,9 +28,10 @@ public class Config : Object { public static string[] config_search_dirs(string primary_dir) { string[] dirs = {primary_dir}; - string[] sysdirs = Environment.get_system_config_dirs(); + string[] sysdirs = Environment.get_system_data_dirs(); foreach (string d in sysdirs) { - dirs += d.dup(); + dirs += Path.build_path(Path.DIR_SEPARATOR_S, + d, "mconnect"); } return dirs; } @@ -41,6 +42,10 @@ public class Config : Object { string[] dirs = config_search_dirs(base_config_dir); string full_path = null; + foreach (string d in dirs) { + debug("config search dir: %s", d); + } + try { bool found = _kf.load_from_dirs(Config.FILE, dirs, out full_path,