X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fsortm.c;h=0caab302ff47ee2ca9cc4b8953573f31328ae46a;hb=552fd7253e5ee9e554c5c7a8248a6322aa4363bb;hp=ffe14f864b207a4109aef09e137a06ec2f5f0305;hpb=240013872c392fe644bd4f79382d9f5314b4ea60;p=mmh diff --git a/uip/sortm.c b/uip/sortm.c index ffe14f8..0caab30 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -159,20 +159,18 @@ 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, "all"); if (!datesw) datesw = "date"; 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"); @@ -279,7 +277,7 @@ main(int argc, char **argv) rename_msgs(mp, dlist); - context_replace(pfolder, folder); /* update current folder */ + context_replace(curfolder, folder); /* update current folder */ seq_save(mp); /* synchronize message sequences */ context_save(); /* save the context file */ folder_free(mp); /* free folder/message structure */