File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -576,18 +576,18 @@ def write_assets(
576576 options = {}
577577 # TODO: We should treat the directory parameter as an actual directory. (Open-EO/openeo-geopyspark-driver#888)
578578 filename = str (directory )
579- directory = Path (filename ).parent
579+ directory_parent = Path (filename ).parent
580580
581581 format_info = IOFORMATS .get (format )
582582 # 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 } "
584584
585585 if format_info .format == "JSON" :
586586 # TODO: eliminate this legacy format?
587587 log .warning (
588588 f"Exporting vector cube { self } to legacy, non-standard JSON format"
589589 )
590- return self .to_legacy_save_result ().write_assets (directory / "suffix_to_remove" )
590+ return self .to_legacy_save_result ().write_assets (directory )
591591
592592 gdf = self ._as_geopandas_df (flatten_prefix = options .get ("flatten_prefix" ))
593593 if format_info .format == "Parquet" :
@@ -605,7 +605,7 @@ def write_assets(
605605 }}
606606 else :
607607 # Multi-file format
608- components = list (directory .glob ("vectorcube.*" ))
608+ components = list (directory_parent .glob ("vectorcube.*" ))
609609 if options .get ("zip_multi_file" ):
610610 # TODO: automatically zip shapefile components?
611611 zip_path = path .with_suffix (f".{ format_info .extension } .zip" )
You can’t perform that action at this time.
0 commit comments