diff options
author | James R. Barlow <jim@purplerock.ca> | 2019-04-14 00:26:12 -0700 |
---|---|---|
committer | James R. Barlow <jim@purplerock.ca> | 2019-04-14 00:26:12 -0700 |
commit | 4bd7578cd1b15a45db94ca9b7f8458840fc30b3a (patch) | |
tree | 05d29a2ee2677eb865fae1604c53b199e4e5310b | |
parent | 8e18ddafd0fc08859caf15a44cf81c82a839b8ac (diff) |
image: fix Path + str error
-rw-r--r-- | src/pikepdf/models/image.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pikepdf/models/image.py b/src/pikepdf/models/image.py index 0bef94b..6805dc1 100644 --- a/src/pikepdf/models/image.py +++ b/src/pikepdf/models/image.py @@ -431,7 +431,7 @@ class PdfImage(PdfImageBase): bio = BytesIO() extension = self._extract_to_stream(stream=bio) bio.seek(0) - filepath = Path(fileprefix + extension) + filepath = Path(Path(fileprefix).name + extension) with filepath.open('wb') as target: copyfileobj(bio, target) return str(filepath) |