[GRASS-SVN] r32449 - grass/branches/develbranch_6/vector/v.in.dxf
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Aug 1 11:08:28 EDT 2008
Author: martinl
Date: 2008-08-01 11:08:28 -0400 (Fri, 01 Aug 2008)
New Revision: 32449
Modified:
grass/branches/develbranch_6/vector/v.in.dxf/main.c
Log:
v.in.dxf: don't overwrite output map if not specified by 'output' argument (merge from trunk r32448)
Modified: grass/branches/develbranch_6/vector/v.in.dxf/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/main.c 2008-08-01 15:07:32 UTC (rev 32448)
+++ grass/branches/develbranch_6/vector/v.in.dxf/main.c 2008-08-01 15:08:28 UTC (rev 32449)
@@ -124,8 +124,9 @@
}
else {
/* make vector map name SQL compliant */
- if (opt.output->answer)
+ if (opt.output->answer) {
output = G_store(opt.output->answer);
+ }
else {
char *p, *p2;
@@ -146,6 +147,11 @@
}
layers = opt.layers->answers;
+
+ if(!G_check_overwrite(argc, argv) && G_find_vector2(output, G_mapset())) {
+ G_fatal_error(_("Option <%s>: <%s> exists."),
+ opt.output->key, output);
+ }
if (Vect_legal_filename(output) < 0)
G_fatal_error(_("Use '%s' option to change vector map name"),
More information about the grass-commit
mailing list