summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-18 15:50:24 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-18 16:38:15 +0900
commitfb57bc0106d7719fd36de2a597e2bbcf582f5e82 (patch)
treec97119adc07889e53d5e71d3675c29881942eff5
parente78e075a37c3bd61a704f6989968b5cf408c3a27 (diff)
downloadefl-fb57bc0106d7719fd36de2a597e2bbcf582f5e82.tar.gz
elm_config: Add env var to skip profile save
This only skips writing the profile name to ~/.elementary/config/profile.cfg This allows easier testing of elementaryt apps (and E) with custom profiles. export ELM_PROFILE_NOSAVE=1
-rw-r--r--src/lib/elementary/elm_config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index f6bc5a8ee6..a3e4662682 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1926,10 +1926,13 @@ _elm_config_profile_save(const char *profile)
Elm_Config_Derived *derived;
char buf[4096], buf2[4096];
int ok = 0, ret;
- const char *err;
+ const char *err, *s;
Eet_File *ef;
size_t len;
+ if ((s = getenv("ELM_PROFILE_NOSAVE")) && atoi(s))
+ return EINA_TRUE;
+
len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
if (len + 1 >= sizeof(buf))
return EINA_FALSE;