Commit e0b3a3bb by willmcgugan@gmail.com

Fixed issue in memoryfs.makedir where a path containing a forward slash at the…

Fixed issue in memoryfs.makedir where a path containing a forward slash at the end would create a directory with an empty filename
parent 07479a0b
...@@ -354,7 +354,7 @@ class MemoryFS(FS): ...@@ -354,7 +354,7 @@ class MemoryFS(FS):
if allow_recreate: if allow_recreate:
return return
raise DestinationExistsError(dirname) raise DestinationExistsError(dirname)
dirpath, dirname = pathsplit(dirname) dirpath, dirname = pathsplit(dirname.rstrip('/'))
if recursive: if recursive:
parent_dir = self._get_dir_entry(dirpath) parent_dir = self._get_dir_entry(dirpath)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment