Skip to content

Commit b956197

Browse files
author
Martin Durant
committed
more
1 parent d5e6888 commit b956197

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

fsspec/implementations/memory.py

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class MemoryFileSystem(AbstractFileSystem):
2626
def _strip_protocol(cls, path):
2727
if path.startswith("memory://"):
2828
path = path[len("memory://") :]
29+
if "::" in path or "://" in path:
30+
return path.rstrip("/")
2931
path = path.lstrip("/").rstrip("/")
3032
return "/" + path if path else ""
3133

fsspec/implementations/tests/test_dask.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ def test_basic(cli):
2727

2828
fs = fsspec.filesystem("dask", target_protocol="memory")
2929
assert fs.ls("") == ["/afile"]
30-
assert fs.cat("afile") == b"data"
30+
assert fs.cat("/afile") == b"data"

0 commit comments

Comments
 (0)