summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_config.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-05-14 17:26:09 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2018-05-14 18:26:21 +0200
commit9c7f5ca33b1af207a7cc98bd170547d7cf4b4fd4 (patch)
treed1913b1c894b046010464361f6b77f2e60d69503 /src/lib/elementary/elm_config.c
parentb83da71d89a7da1a12f83c4fc2a2b0bc900146ad (diff)
elm: use build dir data when EFL_RUN_IN_TREE is set
Summary: this prevents tests from loading user configs and providing inconsistent results or accidentally modifying a user's config fix T6863 Depends on D6013 Reviewers: cedric, stefan_schmidt Reviewed By: stefan_schmidt Subscribers: stefan_schmidt Tags: #efl Maniphest Tasks: T6863 Differential Revision: https://phab.enlightenment.org/D6014
Diffstat (limited to 'src/lib/elementary/elm_config.c')
-rw-r--r--src/lib/elementary/elm_config.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 0a208f12b8..aa76258e04 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1443,7 +1443,7 @@ _profile_fetch_from_conf(void)
1443 } 1443 }
1444 } 1444 }
1445 1445
1446 for (i = 0; i < 2; i++) 1446 for (i = 0; i < 2 && !_use_build_config; i++)
1447 { 1447 {
1448 // user profile 1448 // user profile
1449 if (i == 0) 1449 if (i == 0)
@@ -1695,21 +1695,24 @@ _config_load(void)
1695 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj); 1695 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
1696 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 1696 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
1697 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del); 1697 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del);
1698 _elm_config = _config_user_load(); 1698 if (!_use_build_config)
1699 if (_elm_config)
1700 { 1699 {
1701 if ((_elm_config->config_version >> ELM_CONFIG_VERSION_EPOCH_OFFSET) < ELM_CONFIG_EPOCH) 1700 _elm_config = _config_user_load();
1702 { 1701 if (_elm_config)
1703 WRN("User's elementary config seems outdated and unusable. Fallback to load system config.");
1704 _config_free(_elm_config);
1705 _elm_config = NULL;
1706 }
1707 else
1708 { 1702 {
1709 if (_elm_config->config_version < ELM_CONFIG_VERSION) 1703 if ((_elm_config->config_version >> ELM_CONFIG_VERSION_EPOCH_OFFSET) < ELM_CONFIG_EPOCH)
1710 _config_update(); 1704 {
1711 _env_get(); 1705 WRN("User's elementary config seems outdated and unusable. Fallback to load system config.");
1712 return; 1706 _config_free(_elm_config);
1707 _elm_config = NULL;
1708 }
1709 else
1710 {
1711 if (_elm_config->config_version < ELM_CONFIG_VERSION)
1712 _config_update();
1713 _env_get();
1714 return;
1715 }
1713 } 1716 }
1714 } 1717 }
1715 1718