X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fcontext_read.c;h=51592a91557b9c83728c498de0aba0cb6f1e8c87;hp=4475ca08fb5d8e3a96e5cdb707eb402a7aa59178;hb=93fa896ceb5fbebe2f1f6e6e36419a13f8ffd99f;hpb=d4c34b4439a9dbd89664de460ed37ecddc260fb1 diff --git a/sbr/context_read.c b/sbr/context_read.c index 4475ca0..51592a9 100644 --- a/sbr/context_read.c +++ b/sbr/context_read.c @@ -25,7 +25,7 @@ */ #include /* mh internals */ -#include /* mh_free0() */ +#include #include /* system call errors */ #include /* structure for getpwuid() results */ #include @@ -65,7 +65,7 @@ context_read(void) ** set mmhpath */ if ((cp = getenv("MMH")) && *cp) { - mmhpath = getcpy(expanddir(cp)); /* rel to cwd */ + mmhpath = mh_xstrdup(expanddir(cp)); /* rel to cwd */ if (stat(mmhpath, &st) != -1 && (st.st_mode & S_IFDIR) == 0) { adios(EX_CONFIG, NULL, "`%s' specified by your MMH environment variable is not a directory", cp); } @@ -83,7 +83,7 @@ context_read(void) */ if ((cp = getenv("MMHP")) && *cp) { if (*cp == '/') { - defpath = getcpy(cp); + defpath = mh_xstrdup(cp); } else { defpath = concat(mmhpath, "/", cp, NULL); } @@ -137,7 +137,7 @@ context_read(void) /* ** Create the default folder (inbox) */ - cp = toabsdir(defaultfolder); + cp = toabsdir(getdeffol()); if (stat(cp, &st) == -1) { if (!makedir(cp)) { adios(EX_CANTCREAT, cp, "Unable to create the default folder"); @@ -169,7 +169,7 @@ context_read(void) } if (*cp == '/') { - ctxpath = getcpy(cp); + ctxpath = mh_xstrdup(cp); } else { ctxpath = concat(mmhpath, "/", cp, NULL); }