[mapserver-commits] r7746 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Jun 25 11:46:12 EDT 2008


Author: sdlime
Date: 2008-06-25 11:46:11 -0400 (Wed, 25 Jun 2008)
New Revision: 7746

Modified:
   trunk/mapserver/mapraster.c
Log:
Fixed a problem with raster patch associated with bug #2369. Seems it was trying to use the tileindex path even if the layer didn't have a tileindex defined.

Modified: trunk/mapserver/mapraster.c
===================================================================
--- trunk/mapserver/mapraster.c	2008-06-25 14:07:49 UTC (rev 7745)
+++ trunk/mapserver/mapraster.c	2008-06-25 15:46:11 UTC (rev 7746)
@@ -1411,14 +1411,18 @@
 #endif 
 */
 
-    msBuildPath(tiAbsFilePath, map->mappath, layer->tileindex); /* absolute path to tileindex file */
+    /*
+    ** If using a tileindex then build the path relative to that file if SHAPEPATH is not set.
+    */
+    if(layer->tileindex) {
+      msBuildPath(tiAbsFilePath, map->mappath, layer->tileindex); /* absolute path to tileindex file */
+      tiAbsDirPath = msGetPath(tiAbsFilePath); /* tileindex file's directory */
+      msBuildPath3(szPath, tiAbsDirPath, map->shapepath, filename);
+      free(tiAbsDirPath);
+    } else {
+      msBuildPath3(szPath, map->mappath, map->shapepath, filename);
+    }
 
-    tiAbsDirPath = msGetPath(tiAbsFilePath); /* tileindex file's directory */
-
-    msBuildPath3(szPath, tiAbsDirPath, map->shapepath, filename);
-
-    free(tiAbsDirPath);
-
     /*
     ** Try to open the file, and read the first 8 bytes as a signature. 
     ** If the open fails for a reason other than "bigness" then we use



More information about the mapserver-commits mailing list