X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/9cf9f118998a7635485e13863d1bc16c1486bb05..c87ca5cca:/uip/rmf.c?ds=inline diff --git a/uip/rmf.c b/uip/rmf.c index 735cf774..c7e6426c 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -37,11 +37,7 @@ main (int argc, char **argv) char *cp, *folder = NULL, newfolder[BUFSIZ]; char buf[BUFSIZ], **argp, **arguments; - setlocale(LC_ALL, ""); - invo_name = r1bindex (argv[0], '/'); - - /* read user profile/context */ - context_read(); + if (nmh_init(argv[0], 1)) { return 1; } arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; @@ -183,7 +179,7 @@ rmf (char *folder) others++; continue; } - if (unlink (dp->d_name) == NOTOK) { + if (m_unlink (dp->d_name) == NOTOK) { admonish (dp->d_name, "unable to unlink %s:", folder); others++; } @@ -197,7 +193,9 @@ rmf (char *folder) */ rma (folder); - chdir (".."); + if (chdir ("..") < 0) { + advise ("..", "chdir"); + } if (others == 0 && remdir (maildir)) return OK;