X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Frmm.c;h=c1b1608c2ea931d4b5aec8f0e132f843bc908dc7;hp=f8a1d236ace03b57b058cffa5580ee2f1205f8c9;hb=682962d94b21e120c78a52a8bdcb6aa994330a14;hpb=714b5c530ece27ea2835a313013f5b770163403c diff --git a/uip/rmm.c b/uip/rmm.c index f8a1d23..c1b1608 100644 --- a/uip/rmm.c +++ b/uip/rmm.c @@ -35,7 +35,7 @@ main(int argc, char **argv) #ifdef LOCALE setlocale(LC_ALL, ""); #endif - invo_name = r1bindex(argv[0], '/'); + invo_name = mhbasename(argv[0]); /* read user profile/context */ context_read(); @@ -73,18 +73,16 @@ main(int argc, char **argv) if (folder) adios(NULL, "only one folder at a time!"); else - folder = pluspath(cp); + folder = getcpy(expandfol(cp)); } else app_msgarg(&msgs, cp); } - if (!context_find("path")) - free(path("./", TFOLDER)); if (!msgs.size) app_msgarg(&msgs, "cur"); if (!folder) - folder = getfolder(1); - maildir = m_maildir(folder); + folder = getcurfol(); + maildir = toabsdir(folder); if (chdir(maildir) == NOTOK) adios(maildir, "unable to change directory to"); @@ -111,7 +109,7 @@ main(int argc, char **argv) ** folder_delmsgs(). */ if (rmmproc) { - context_replace(pfolder, folder); + context_replace(curfolder, folder); context_save(); fflush(stdout); } @@ -120,7 +118,7 @@ main(int argc, char **argv) folder_delmsgs(mp, unlink_msgs, 0); seq_save(mp); /* synchronize message sequences */ - context_replace(pfolder, folder); /* update current folder */ + context_replace(curfolder, folder); /* update current folder */ context_save(); /* save the context file */ folder_free(mp); /* free folder structure */ done(0);