X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhlist.c;h=8902f7595f206e493c813b0cb08bd6e9da643e3a;hp=5eb0937c9b80231d6e93fbc1a2064fdf7a9dad64;hb=ffe93d6dc707aaf92529cefb38a1814956b48c9e;hpb=097c84b61603c4a4c5837f3dcc09c30a1e751702 diff --git a/uip/mhlist.c b/uip/mhlist.c index 5eb0937..8902f75 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -219,8 +218,9 @@ do_cache: case FILESW: if (!(cp = *argp++) || (*cp == '-' && cp[1])) - adios(NULL, "missing argument to %s", argp[-2]); - file = *cp == '-' ? cp : path(cp, TFILE); + adios(NULL, "missing argument to %s", + argp[-2]); + file = *cp == '-' ? cp : getcpy(expanddir(cp)); continue; case VERBSW: @@ -238,7 +238,7 @@ do_cache: if (folder) adios(NULL, "only one folder at a time!"); else - folder = pluspath(cp); + folder = getcpy(expandfol(cp)); } else app_msgarg(&msgs, cp); } @@ -256,7 +256,7 @@ do_cache: /* Check for private cache location */ if (!(cache_private = context_find(nmhprivcache))) cache_private = ".cache"; - cache_private = getcpy(m_maildir(cache_private)); + cache_private = getcpy(toabsdir(cache_private)); /* ** Check for storage directory. If specified, @@ -266,10 +266,7 @@ do_cache: if ((cp = context_find(nmhstorage)) && *cp) tmp = concat(cp, "/", invo_name, NULL); else - tmp = add(m_maildir(invo_name), NULL); - - if (!context_find("path")) - free(path("./", TFOLDER)); + tmp = getcpy(toabsdir(invo_name)); if (file && msgs.size) adios(NULL, "cannot specify msg and file at same time!"); @@ -289,10 +286,10 @@ do_cache: ** message(s) are coming from a folder */ if (!msgs.size) - app_msgarg(&msgs, "cur"); + app_msgarg(&msgs, seq_cur); if (!folder) - folder = getfolder(FCUR); - maildir = m_maildir(folder); + folder = getcurfol(); + maildir = toabsdir(folder); if (chdir(maildir) == NOTOK) adios(maildir, "unable to change directory to"); @@ -363,7 +360,7 @@ do_cache: /* If reading from a folder, do some updating */ if (mp) { - context_replace(pfolder, folder); /* update current folder */ + context_replace(curfolder, folder); /* update current folder */ seq_setcur(mp, mp->hghsel); /* update current message */ seq_save(mp); /* synchronize sequences */ context_save(); /* save the context file */