Skip to content

Commit 1c1d5bf

Browse files
committed
🚑 python 2 non-unicode string caught again by pyfilesystem2. related to #303
1 parent 9ba3c84 commit 1c1d5bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

moban/file_system.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ def is_dir(path):
116116
if "zip://" in path:
117117
zip_file, folder = path.split(".zip/")
118118
with fs.open_fs(zip_file + ".zip") as the_fs:
119-
return the_fs.isdir(folder)
119+
return the_fs.isdir(to_unicode(folder))
120120

121121
if "tar://" in path:
122122
zip_file, folder = path.split(".tar/")
123123
with fs.open_fs(zip_file + ".tar") as the_fs:
124-
return the_fs.isdir(folder)
124+
return the_fs.isdir(to_unicode(folder))
125125

126126
path = to_unicode(path)
127127
dir_name = fs.path.dirname(path)

0 commit comments

Comments
 (0)