config: Add env var to skip profile save

This only skips writing the profile name to
  ~/.e/e/config/profile.cfg

This allows easier testing of E with custom profiles.
Note that this goes together with another patch in elementary, but the
env var is different (note: we could use a single one). This is only
meant for debugging.

export E_CONF_PROFILE_NOSAVE=1
This commit is contained in:
Jean-Philippe Andre 2017-08-18 15:52:46 +09:00
parent 8da6aa4142
commit bc55beb638
1 changed files with 4 additions and 0 deletions

View File

@ -1956,8 +1956,12 @@ e_config_profile_save(void)
{
Eet_File *ef;
char buf[4096], buf2[4096];
const char *s;
int ok = 0;
if ((s = getenv("E_CONF_PROFILE_NOSAVE")) && atoi(s))
return 1;
/* FIXME: check for other sessions fo E running */
e_user_dir_concat_static(buf, "config/profile.cfg");
e_user_dir_concat_static(buf2, "config/profile.cfg.tmp");