X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Frepl.c;h=ff936bc0a745ff7f7feb3f2c5420c7b5ca6498cd;hp=006cabea96f17a251f066a3d5c660e1be15692ed;hb=682962d94b21e120c78a52a8bdcb6aa994330a14;hpb=097c84b61603c4a4c5837f3dcc09c30a1e751702 diff --git a/uip/repl.c b/uip/repl.c index 006cabe..ff936bc 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -199,8 +199,7 @@ main(int argc, char **argv) adios(NULL, "missing argument to %s", argp[-2]); dp = NULL; if (*cp == '@') - cp = dp = path(cp + 1, - TSUBCWF); + cp = dp = getcpy(expandfol(cp)); if (fcc) fcc = add(", ", fcc); fcc = add(cp, fcc); @@ -213,7 +212,7 @@ main(int argc, char **argv) adios(NULL, "only one file at a time!"); if (!(cp = *argp++) || *cp == '-') adios(NULL, "missing argument to %s", argp[-2]); - file = path(cp, TFILE); + file = getcpy(expanddir(cp)); continue; case FILTSW: if (!(cp = *argp++) || *cp == '-') @@ -268,7 +267,7 @@ main(int argc, char **argv) if (folder) adios(NULL, "only one folder at a time!"); else - folder = pluspath(cp); + folder = getcpy(expandfol(cp)); } else { if (msg) adios(NULL, "only one message at a time!"); @@ -286,13 +285,11 @@ main(int argc, char **argv) cwd = getcpy(pwd()); - if (!context_find("path")) - free(path("./", TFOLDER)); if (file && (msg || folder)) adios(NULL, "can't mix files and folders/msgs"); #ifdef MHE - strncpy(drft, buildsw ? m_maildir("reply") + strncpy(drft, buildsw ? toabsdir("reply") : m_draft("new"), sizeof(drft)); #else strncpy(drft, m_draft("new"), sizeof(drft)); @@ -310,8 +307,8 @@ main(int argc, char **argv) if (!msg) msg = "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"); @@ -332,7 +329,7 @@ main(int argc, char **argv) if (mp->numsel > 1) adios(NULL, "only one message at a time!"); - context_replace(pfolder, folder); /* update current folder */ + context_replace(curfolder, folder); /* update current folder */ seq_setcur(mp, mp->lowsel); /* update current message */ seq_save(mp); /* synchronize sequences */ context_save(); /* save the context file */