[GRASS-SVN] r35285 - grass/trunk/vector/v.surf.rst

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 8 04:09:28 EST 2009


Author: marisn
Date: 2009-01-08 04:09:28 -0500 (Thu, 08 Jan 2009)
New Revision: 35285

Modified:
   grass/trunk/vector/v.surf.rst/main.c
Log:
Chceck vector output file name validity before any processing (merge r35283)

Modified: grass/trunk/vector/v.surf.rst/main.c
===================================================================
--- grass/trunk/vector/v.surf.rst/main.c	2009-01-08 09:05:30 UTC (rev 35284)
+++ grass/trunk/vector/v.surf.rst/main.c	2009-01-08 09:09:28 UTC (rev 35285)
@@ -377,6 +377,26 @@
     treefile = parm.treefile->answer;
     overfile = parm.overfile->answer;
 
+    if (devi) {
+	if (Vect_legal_filename(devi) == -1)
+	    G_fatal_error(_("Output vector map name <%s> is not valid map name"),
+			  devi);
+    }
+    if (cvdev) {
+	if (Vect_legal_filename(cvdev) == -1)
+	    G_fatal_error(_("Output vector map name <%s> is not valid map name"),
+			  cvdev);
+    }
+    if (treefile) {
+	if (Vect_legal_filename(treefile) == -1)
+	    G_fatal_error(_("Output vector map name <%s> is not valid map name"),
+			  treefile);
+    }
+    if (overfile) {
+	if (Vect_legal_filename(overfile) == -1)
+	    G_fatal_error(_("Output vector map name <%s> is not valid map name"),
+			  overfile);
+    }
     /*    if (treefile)
        Vect_check_input_output_name(input, treefile, GV_FATAL_EXIT);
 



More information about the grass-commit mailing list