[mapserver-commits] r12987 - trunk/mapserver/mapcache/lib

svn at osgeo.org svn at osgeo.org
Mon Jan 16 11:09:43 EST 2012


Author: aboudreault
Date: 2012-01-16 08:09:43 -0800 (Mon, 16 Jan 2012)
New Revision: 12987

Modified:
   trunk/mapserver/mapcache/lib/cache_disk.c
Log:
Fixed Unknown error when trying to access a file on Windows (#4106)

Modified: trunk/mapserver/mapcache/lib/cache_disk.c
===================================================================
--- trunk/mapserver/mapcache/lib/cache_disk.c	2012-01-16 05:00:23 UTC (rev 12986)
+++ trunk/mapserver/mapcache/lib/cache_disk.c	2012-01-16 16:09:43 UTC (rev 12987)
@@ -166,7 +166,7 @@
    GC_CHECK_ERROR(ctx);
 
    ret = apr_file_remove(filename,ctx->pool);
-   if(ret != APR_SUCCESS && ret != ENOENT) {
+   if(ret != APR_SUCCESS && !APR_STATUS_IS_ENOENT(ret)) {
       ctx->set_error(ctx, 500,  "failed to remove file %s: %s",filename, apr_strerror(ret,errmsg,120));
    }
 }
@@ -239,7 +239,7 @@
       }
       return MAPCACHE_SUCCESS;
    } else {
-      if(rv == ENOENT) {
+      if(APR_STATUS_IS_ENOENT(rv)) {
          /* the file doesn't exist on the disk */
          return MAPCACHE_CACHE_MISS;
       } else {
@@ -302,7 +302,7 @@
    *hackptr2 = '/';
 
    ret = apr_file_remove(filename,ctx->pool);
-   if(ret != APR_SUCCESS && ret != ENOENT) {
+   if(ret != APR_SUCCESS && !APR_STATUS_IS_ENOENT(ret)) {
       ctx->set_error(ctx, 500,  "failed to remove file %s: %s",filename, apr_strerror(ret,errmsg,120));
    }
 



More information about the mapserver-commits mailing list