From 6a9bf675a4f66ff3893b2fe35d351d652174ce5f Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 14 Jun 2020 18:27:13 -0400 Subject: [PATCH] Fix #185. --- korman/exporter/outfile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/korman/exporter/outfile.py b/korman/exporter/outfile.py index 1766189..8e71174 100644 --- a/korman/exporter/outfile.py +++ b/korman/exporter/outfile.py @@ -239,9 +239,11 @@ class OutputFiles: stream = hsRAMStream(self._version) else: if dat_only: - file_path = str(self._export_file.parent / filename) + file_path = self._export_file.parent.joinpath(filename) else: - file_path = str(self._export_path / dirname / filename) + file_path = self._export_path.joinpath(dirname, filename) + file_path.parent.mkdir(parents=True, exist_ok=True) + file_path = str(file_path) # FIXME when we bump to Python 3.6+ stream = hsFileStream(self._version) stream.open(file_path, fmCreate) backing_stream = stream