- /* check for "type=tar" attribute */
- if (!mh_strcasecmp(*ap, "type")) {
- if (mh_strcasecmp(*ep, "tar"))
- break;
-
- tarP = 1;
- continue;
- }
-
- /* check for "conversions=compress" attribute */
- if ((!mh_strcasecmp(*ap, "conversions") ||
- !mh_strcasecmp(*ap, "x-conversions"))
- && (!mh_strcasecmp(*ep, "compress") ||
- !mh_strcasecmp(*ep, "x-compress"))) {
- zP = 1;
- continue;
- }
- /* check for "conversions=gzip" attribute */
- if ((!mh_strcasecmp(*ap, "conversions") ||
- !mh_strcasecmp(*ap, "x-conversions"))
- && (!mh_strcasecmp(*ep, "gzip") ||
- !mh_strcasecmp(*ep, "x-gzip"))) {
- gzP = 1;
- continue;
- }
- }
-
- if (tarP) {
- ct->c_showproc = getcpy(zP ? "%euncompress | tar tvf -" : (gzP ? "%egzip -dc | tar tvf -" : "%etar tvf -"));
- if (!ct->c_storeproc) {
- if (autosw) {
- ct->c_storeproc = getcpy(zP ? "| uncompress | tar xvpf -" : (gzP ? "| gzip -dc | tar xvpf -" : "| tar xvpf -"));
- ct->c_umask = 0022;
- } else {
- ct->c_storeproc= getcpy(zP ? "%m%P.tar.Z" : (gzP ? "%m%P.tar.gz" : "%m%P.tar"));
- }
+ if (mh_strcasecmp(*ap, "name")==0 &&
+ *(cp = *ep) != '/' && *cp != '.' &&
+ *cp != '|' && *cp != '!' &&
+ !strchr(cp, '%')) {
+ ct->c_storeproc = getcpy(cp);
+ break;