Skip to content

Commit

Permalink
Fix handling of Paths in zip implementation (#1689)
Browse files Browse the repository at this point in the history
Fixes #1688

Co-authored-by: Martin Durant <[email protected]>
  • Loading branch information
QuLogic and martindurant authored Sep 23, 2024
1 parent 4af4e76 commit 1f61512
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fsspec/implementations/zip.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import zipfile

import fsspec
Expand Down Expand Up @@ -48,7 +49,7 @@ def __init__(
if mode not in set("rwa"):
raise ValueError(f"mode '{mode}' no understood")
self.mode = mode
if isinstance(fo, str):
if isinstance(fo, (str, os.PathLike)):
if mode == "a":
m = "r+b"
else:
Expand Down

0 comments on commit 1f61512

Please sign in to comment.