We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5e6888 commit b956197Copy full SHA for b956197
fsspec/implementations/memory.py
@@ -26,6 +26,8 @@ class MemoryFileSystem(AbstractFileSystem):
26
def _strip_protocol(cls, path):
27
if path.startswith("memory://"):
28
path = path[len("memory://") :]
29
+ if "::" in path or "://" in path:
30
+ return path.rstrip("/")
31
path = path.lstrip("/").rstrip("/")
32
return "/" + path if path else ""
33
fsspec/implementations/tests/test_dask.py
@@ -27,4 +27,4 @@ def test_basic(cli):
fs = fsspec.filesystem("dask", target_protocol="memory")
assert fs.ls("") == ["/afile"]
- assert fs.cat("afile") == b"data"
+ assert fs.cat("/afile") == b"data"
0 commit comments