[mapserver-commits] r10023 - branches/branch-5-6/mapserver

svn at osgeo.org svn at osgeo.org
Sat Mar 27 13:52:04 EDT 2010


Author: dmorissette
Date: 2010-03-27 13:52:04 -0400 (Sat, 27 Mar 2010)
New Revision: 10023

Modified:
   branches/branch-5-6/mapserver/HISTORY.TXT
   branches/branch-5-6/mapserver/mapquery.c
Log:
Improve error message when loadQuery() filename extension check fails (#3302)

Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT	2010-03-26 18:50:33 UTC (rev 10022)
+++ branches/branch-5-6/mapserver/HISTORY.TXT	2010-03-27 17:52:04 UTC (rev 10023)
@@ -15,6 +15,8 @@
 Version 5.6.4 (????-??-??):
 ---------------------------
 
+- Improve error message when loadQuery() filename extension check fails (#3302)
+
 - Fix GetLegendGraphic using keyimages (#3398)
 
 - Fix getFeatureInfo quries on WFS layers (#3403)

Modified: branches/branch-5-6/mapserver/mapquery.c
===================================================================
--- branches/branch-5-6/mapserver/mapquery.c	2010-03-26 18:50:33 UTC (rev 10022)
+++ branches/branch-5-6/mapserver/mapquery.c	2010-03-27 17:52:04 UTC (rev 10023)
@@ -220,7 +220,10 @@
   /* 
   ** Make sure the file at least has the right extension. 
   */ 
-  if(msEvalRegex("\\.qy$", filename) != MS_TRUE) return MS_FAILURE; 
+  if(msEvalRegex("\\.qy$", filename) != MS_TRUE) {
+    msSetError(MS_MISCERR, "Query file extension check failed on %s (extension must be .qy)", "msLoadQuery()", filename);
+    return MS_FAILURE; 
+  }
 
   stream = fopen(filename, "r");
   if(!stream) {



More information about the mapserver-commits mailing list