summaryrefslogtreecommitdiff
path: root/mh
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2006-05-20 10:44:31 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2006-05-20 10:44:31 +0000
commit22316e4ce362d21f2749b2e073a357036943f257 (patch)
treeb51f63465888e23b9799e9bc2295396ae76f5086 /mh
parentb264f32c7734360dd7307b669b94c1404ef6a31a (diff)
downloadmailutils-22316e4ce362d21f2749b2e073a357036943f257.tar.gz
mailutils-22316e4ce362d21f2749b2e073a357036943f257.tar.bz2
(main): Fix coredump if invoked with no options.
Diffstat (limited to 'mh')
-rw-r--r--mh/rmf.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mh/rmf.c b/mh/rmf.c
index 2c440ae6d..db9929a37 100644
--- a/mh/rmf.c
+++ b/mh/rmf.c
@@ -199,12 +199,16 @@ main (int argc, char **argv)
mu_argp_init (program_version, NULL);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
- if (!explicit_folder)
- interactive = 1;
cur_folder_path = current_folder_path ();
- name = mh_expand_name (NULL, folder_name, 0);
+ if (!explicit_folder)
+ {
+ interactive = 1;
+ name = cur_folder_path;
+ }
+ else
+ name = mh_expand_name (NULL, folder_name, 0);
rmf (name);
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.