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
This commit is contained in:
Jean-Philippe Andre 2017-08-18 15:50:24 +09:00
parent e78e075a37
commit fb57bc0106
1 changed files with 4 additions and 1 deletions

View File

@ -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;