[GRASS-SVN] r30696 - grass/trunk/vector/v.edit
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 22 15:51:17 EDT 2008
Author: martinl
Date: 2008-03-22 15:51:17 -0400 (Sat, 22 Mar 2008)
New Revision: 30696
Modified:
grass/trunk/vector/v.edit/main.c
Log:
v.edit: cosmetics -- check for illegal map name first, don't print duplicated warning (from Vect_open_new)
Modified: grass/trunk/vector/v.edit/main.c
===================================================================
--- grass/trunk/vector/v.edit/main.c 2008-03-22 19:46:32 UTC (rev 30695)
+++ grass/trunk/vector/v.edit/main.c 2008-03-22 19:51:17 UTC (rev 30696)
@@ -80,21 +80,19 @@
if (action_mode == MODE_CREATE) {
int overwrite;
+
+ if (G_legal_filename(params.map -> answer) == -1) {
+ G_fatal_error(_("<%s> is an illegal file name"),
+ params.map -> answer);
+ }
+
overwrite = G_check_overwrite(argc, argv);
if (G_find_vector2(params.map -> answer, G_mapset()) ) {
- if (overwrite)
- G_warning (_("Vector map <%s> already exists and will be overwritten"),
- params.map -> answer);
- else
+ if (!overwrite)
G_fatal_error (_("Vector map <%s> already exists"),
params.map -> answer);
}
- if (G_legal_filename(params.map -> answer) == -1) {
- G_fatal_error(_("<%s> is an illegal file name"),
- params.map -> answer);
- }
-
/* 3D vector maps? */
ret = Vect_open_new (&Map, params.map -> answer, WITHOUT_Z);
if (ret == -1) {
More information about the grass-commit
mailing list