Skip to content

Commit 5ebb9d2

Browse files
[io] fix: ensure that remote file paths are correctly processed
Switch from pathlib.Path to os.path.join to ensure correct path building.
1 parent 004ab6f commit 5ebb9d2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

libs/io/garf_io/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414

1515
"""Writing GarfReport to anywhere."""
1616

17-
__version__ = '0.0.15'
17+
__version__ = '0.0.16'

libs/io/garf_io/writers/csv_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def write(self, report: garf_report.GarfReport, destination: str) -> str:
8686
destination = formatter.format_extension(destination, new_extension='.csv')
8787
self.create_dir()
8888
logger.debug('Writing %d rows of data to %s', len(report), destination)
89-
output_path = pathlib.Path(self.destination_folder) / destination
89+
output_path = os.path.join(self.destination_folder, destination)
9090
with smart_open.open(
9191
output_path,
9292
encoding='utf-8',

libs/io/garf_io/writers/json_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def write(self, report: garf_report.GarfReport, destination: str) -> str:
7171
)
7272
self.create_dir()
7373
logger.debug('Writing %d rows of data to %s', len(report), destination)
74-
output_path = pathlib.Path(self.destination_folder) / destination
74+
output_path = os.path.join(self.destination_folder, destination)
7575
with smart_open.open(output_path, 'w', encoding='utf-8') as f:
7676
f.write(report.to_json(output=self.format))
7777
logger.debug('Writing to %s is completed', output_path)

0 commit comments

Comments
 (0)