X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhstoresbr.c;h=44fd19aaeb3208ab314d044eea26a4fe09f5934a;hp=8b2dc00ae246e04bbc77ffcc8f7e7fd05c2981de;hb=d39e2c447b0d163a5a63f480b23d06edb7a73aa0;hpb=714b5c530ece27ea2835a313013f5b770163403c diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index 8b2dc00..44fd19a 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -249,13 +249,13 @@ store_application(CT ct) } if (tarP) { - ct->c_showproc = add(zP ? "%euncompress | tar tvf -" : (gzP ? "%egzip -dc | tar tvf -" : "%etar tvf -"), NULL); + ct->c_showproc = getcpy(zP ? "%euncompress | tar tvf -" : (gzP ? "%egzip -dc | tar tvf -" : "%etar tvf -")); if (!ct->c_storeproc) { if (autosw) { - ct->c_storeproc = add(zP ? "| uncompress | tar xvpf -" : (gzP ? "| gzip -dc | tar xvpf -" : "| tar xvpf -"), NULL); + ct->c_storeproc = getcpy(zP ? "| uncompress | tar xvpf -" : (gzP ? "| gzip -dc | tar xvpf -" : "| tar xvpf -")); ct->c_umask = 0022; } else { - ct->c_storeproc= add(zP ? "%m%P.tar.Z" : (gzP ? "%m%P.tar.gz" : "%m%P.tar"), NULL); + ct->c_storeproc= getcpy(zP ? "%m%P.tar.Z" : (gzP ? "%m%P.tar.gz" : "%m%P.tar")); } } } @@ -417,9 +417,9 @@ store_external(CT ct) if ((cp = e->eb_name) && *cp != '/' && *cp != '.' && *cp != '|' && *cp != '!' && !strchr(cp, '%')) { if (!ct->c_storeproc) - ct->c_storeproc = add(cp, NULL); + ct->c_storeproc = getcpy(cp); if (!p->c_storeproc) - p->c_storeproc = add(cp, NULL); + p->c_storeproc = getcpy(cp); } } @@ -506,11 +506,11 @@ store_content(CT ct, CT p) */ if (p) { appending = 1; - ct->c_storage = add(p->c_storage, NULL); + ct->c_storage = getcpy(p->c_storage); /* record the folder name */ if (p->c_folder) { - ct->c_folder = add(p->c_folder, NULL); + ct->c_folder = getcpy(p->c_folder); } goto got_filename; } @@ -550,19 +550,19 @@ store_content(CT ct, CT p) /* Store content in temporary file for now */ tmpfilenam = m_mktemp(invo_name, NULL, NULL); - ct->c_storage = add(tmpfilenam, NULL); + ct->c_storage = getcpy(tmpfilenam); /* Get the folder name */ if (cp[1]) - folder = pluspath(cp); + folder = getcpy(expandfol(cp)); else - folder = getfolder(1); + folder = getcurfol(); /* Check if folder exists */ - create_folder(m_mailpath(folder), 0, exit); + create_folder(toabsdir(folder), 0, exit); /* Record the folder name */ - ct->c_folder = add(folder, NULL); + ct->c_folder = getcpy(folder); if (cp[1]) free(folder); @@ -584,7 +584,7 @@ store_content(CT ct, CT p) return show_content_aux(ct, 1, 0, buffer + 1, dir); /* record the filename */ - ct->c_storage = add(buffer, NULL); + ct->c_storage = getcpy(buffer); got_filename: /* flush the output stream */ @@ -952,7 +952,7 @@ parse_format_string(CT ct, char *cp, char *buffer, int buflen, char *dir) case 'm': /* insert message number */ - snprintf(bp, buflen, "%s", r1bindex(ct->c_file, '/')); + snprintf(bp, buflen, "%s", mhbasename(ct->c_file)); break; case 'P': @@ -1033,7 +1033,7 @@ get_storeproc(CT ct) if (!mh_strcasecmp(*ap, "name") && *(cp = *ep) != '/' && *cp != '.' && *cp != '|' && *cp != '!' && !strchr(cp, '%')) { - ct->c_storeproc = add(cp, NULL); + ct->c_storeproc = getcpy(cp); return; } }