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