Skip to content

Commit b57a012

Browse files
committed
bugfix
1 parent 3bca2c6 commit b57a012

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/cache_sqlite.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ static void _mapcache_cache_sqlite_filename_for_tile(mapcache_context *ctx, mapc
237237
mapcache_requested_dimension *entry = APR_ARRAY_IDX(tile->dimensions,i,mapcache_requested_dimension*);
238238
mapcache_dimension_type dimtype = entry->dimension->type;
239239
const char *dimval;
240+
char *single_dim;
240241
if (dcache->allow_path_in_dim
241242
&& (dimtype == MAPCACHE_DIMENSION_POSTGRESQL
242243
|| dimtype == MAPCACHE_DIMENSION_SQLITE
@@ -252,7 +253,7 @@ static void _mapcache_cache_sqlite_filename_for_tile(mapcache_context *ctx, mapc
252253
// Forbid '.' and '/' in the dimension value
253254
dimval = mapcache_util_str_sanitize(ctx->pool,entry->cached_value,"/.",'#');
254255
}
255-
char *single_dim = apr_pstrcat(ctx->pool,"{dim:",entry->dimension->name,"}",NULL);
256+
single_dim = apr_pstrcat(ctx->pool,"{dim:",entry->dimension->name,"}",NULL);
256257
dimstring = apr_pstrcat(ctx->pool,dimstring,"#",dimval,NULL);
257258
if(strstr(*path,single_dim)) {
258259
*path = mapcache_util_str_replace(ctx->pool,*path, single_dim, dimval);

0 commit comments

Comments
 (0)