Commit 93304ed3 93304ed34c3d1ff9bd736dc9b3a216cfc73a2096 by Sergey Poznyakoff

(read_mts_profile): Allow .mtstailor to override system-wide configuration values.

1 parent f19a9bb4
...@@ -275,18 +275,17 @@ void ...@@ -275,18 +275,17 @@ void
275 read_mts_profile () 275 read_mts_profile ()
276 { 276 {
277 char *p; 277 char *p;
278 mh_context_t *local_profile;
278 279
279 p = mh_expand_name (MHLIBDIR, "mtstailor", 0); 280 p = mh_expand_name (MHLIBDIR, "mtstailor", 0);
280 if (!p)
281 {
282 char *home = mu_get_homedir ();
283 if (!home)
284 abort (); /* shouldn't happen */
285 asprintf (&p, "%s/%s", home, ".mtstailor");
286 free (home);
287 }
288 mts_profile = mh_context_create (p, 1); 281 mts_profile = mh_context_create (p, 1);
289 mh_context_read (mts_profile); 282 mh_context_read (mts_profile);
283
284 p = mu_tilde_expansion ("~/.mtstailor", "/", NULL);
285 local_profile = mh_context_create (p, 1);
286 if (mh_context_read (local_profile) == 0)
287 mh_context_merge (mts_profile, local_profile);
288 mh_context_destroy (&local_profile);
290 } 289 }
291 290
292 291
......