From d5ea0abf493a860c5872c1e8a9c5dd649626a829 Mon Sep 17 00:00:00 2001 From: tjellicoe Date: Tue, 2 Jul 2024 14:13:53 +0100 Subject: [PATCH] Updated to use filename_generator function which includes automatic cleanup for temporary files --- eoxserver/render/mapserver/factories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eoxserver/render/mapserver/factories.py b/eoxserver/render/mapserver/factories.py index de1072a7..01ecfd52 100644 --- a/eoxserver/render/mapserver/factories.py +++ b/eoxserver/render/mapserver/factories.py @@ -677,7 +677,7 @@ def _create_raster_layer_objs(map_obj, extent, sr, data, filename_generator, env splitpath = data.rsplit(":",1) data = splitpath[0] index = int(splitpath[1]) + 1 - temp_path = "/vsimem/%s" % uuid4().hex + temp_path = filename_generator.generate() # extract only desired index to new temporary file gdal.Translate(temp_path, data, bandList=[index]) data = temp_path