X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b56c88e2847c582f9b18ae5bbda44f033cd49c42..64ef3b3008a7b990c2c856c24354ed2cabcc76dc:/uip/rmf.c?ds=sidebyside diff --git a/uip/rmf.c b/uip/rmf.c index 765ec9e1..f714c472 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -103,7 +103,7 @@ main (int argc, char **argv) if (interactive) { cp = concat ("Remove folder \"", folder, "\"? ", NULL); - if (!getanswer (cp)) + if (!read_yes_or_no_if_tty (cp)) done (0); free (cp); } @@ -179,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++; } @@ -193,7 +193,9 @@ rmf (char *folder) */ rma (folder); - chdir (".."); + if (chdir ("..") < 0) { + advise ("..", "chdir"); + } if (others == 0 && remdir (maildir)) return OK;