[GRASS-SVN] r33669 - grass/branches/develbranch_6/general/g.mremove
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Oct 4 06:13:51 EDT 2008
Author: hamish
Date: 2008-10-04 06:13:51 -0400 (Sat, 04 Oct 2008)
New Revision: 33669
Modified:
grass/branches/develbranch_6/general/g.mremove/main.c
Log:
explain what needs to happen
Modified: grass/branches/develbranch_6/general/g.mremove/main.c
===================================================================
--- grass/branches/develbranch_6/general/g.mremove/main.c 2008-10-04 10:03:09 UTC (rev 33668)
+++ grass/branches/develbranch_6/general/g.mremove/main.c 2008-10-04 10:13:51 UTC (rev 33669)
@@ -103,6 +103,9 @@
if (flag.regex->answer && flag.extended->answer)
G_fatal_error(_("-r and -e are mutually exclusive"));
+ if (!flag.force->answer)
+ G_message(_("The following files would be deleted:"));
+
for (n = 0; n < nlist; n++) {
o = opt[n];
G_free((char *)o->gisprompt);
@@ -123,8 +126,8 @@
name = wc2regex(name);
if (regcomp(®ex, name,
(flag.regex->answer ? 0 : REG_EXTENDED) | REG_NOSUB))
- G_fatal_error(_
- ("Unable to compile regular expression %s"),
+ G_fatal_error(
+ _("Unable to compile regular expression %s"),
name);
if (!flag.regex->answer && !flag.extended->answer)
G_free(name);
@@ -150,6 +153,11 @@
}
}
+ if (!flag.force->answer) {
+ G_message(" ");
+ G_message(_("You must use the force flag to actually remove them. Exiting."));
+ }
+
exit(result);
}
More information about the grass-commit
mailing list