msSearchDiskTree() throws MS_IOERR in debug mode on missing .qix files
msSearchDiskTree() throws MS_IOERR in debug mode on missing .qix files, which
causes mserror.i to throw an exception in MapScript in 4.8.3. I have confirmed
this behavior with Python MapScript. I think that the existing behavior is a bit
aggressive for what is to all intents and purposes a simple warning.
The following patch changes the error type of this warning to MS_NOTFOUND, which
has the exact same result in the mapserv CGI, but will not cause mserror.i to
throw an exception.
---------
diff -Naur mapserver.orig/maptree.c mapserver/maptree.c
--- mapserver.orig/maptree.c 2005-08-25 10:20:16.000000000 -0400
+++ mapserver/maptree.c 2006-04-18 19:46:00.000000000 -0400
@@ -530,7 +530,7 @@
if(!disktree) {
/* only set this error IF debugging is turned on, gets annoying otherwise */
- if(debug) msSetError(MS_IOERR, "Unable to open spatial index for %s. In
most cases you can safely ignore this message, otherwise check file names and
permissions.", "msSearchDiskTree()", filename);
+ if(debug) msSetError(MS_NOTFOUND, "Unable to open spatial index for %s. In
most cases you can safely ignore this message, otherwise check file names and
permissions.", "msSearchDiskTree()", filename);
return(NULL);
}