diff --git a/digital_land/phase/convert.py b/digital_land/phase/convert.py index b73989f7..d22282b5 100644 --- a/digital_land/phase/convert.py +++ b/digital_land/phase/convert.py @@ -401,7 +401,7 @@ def _read_binary_file(self, input_path): # TODO erpace temp path with output path if self.output_path: temp_path = tempfile.NamedTemporaryFile( - suffix=".zip", dir=str(self.output_path.parent) + suffix=".zip", dir=os.path.dirname(self.output_path) ).name else: temp_path = tempfile.NamedTemporaryFile(suffix=".zip").name diff --git a/tests/unit/phase/test_convert.py b/tests/unit/phase/test_convert.py index d588c892..f52b050f 100755 --- a/tests/unit/phase/test_convert.py +++ b/tests/unit/phase/test_convert.py @@ -30,6 +30,7 @@ def test_process_xlsm_is_loaded(self): "tests/data/resource_examples/geopackage.resource", "tests/data/resource_examples/gml.resource", "tests/data/resource_examples/kml.resource", + "tests/data/resource_examples/shapefile_zip.resource", "tests/expectations/resources_to_test_expectations/data_for_url_expect_test.sqlite3", ], )