File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -578,18 +578,18 @@ def write_assets(
578
578
options = {}
579
579
# TODO: We should treat the directory parameter as an actual directory. (Open-EO/openeo-geopyspark-driver#888)
580
580
filename = str (directory )
581
- directory = Path (filename ).parent
581
+ directory_parent = Path (filename ).parent
582
582
583
583
format_info = IOFORMATS .get (format )
584
584
# TODO: check if format can be used for vector data?
585
- path = directory / f"vectorcube.{ format_info .extension } "
585
+ path = directory_parent / f"vectorcube.{ format_info .extension } "
586
586
587
587
if format_info .format == "JSON" :
588
588
# TODO: eliminate this legacy format?
589
589
log .warning (
590
590
f"Exporting vector cube { self } to legacy, non-standard JSON format"
591
591
)
592
- return self .to_legacy_save_result ().write_assets (directory / "suffix_to_remove" )
592
+ return self .to_legacy_save_result ().write_assets (directory )
593
593
594
594
gdf = self ._as_geopandas_df (flatten_prefix = options .get ("flatten_prefix" ))
595
595
if format_info .format == "Parquet" :
@@ -607,7 +607,7 @@ def write_assets(
607
607
}}
608
608
else :
609
609
# Multi-file format
610
- components = list (directory .glob ("vectorcube.*" ))
610
+ components = list (directory_parent .glob ("vectorcube.*" ))
611
611
if options .get ("zip_multi_file" ):
612
612
# TODO: automatically zip shapefile components?
613
613
zip_path = path .with_suffix (f".{ format_info .extension } .zip" )
You can’t perform that action at this time.
0 commit comments