We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
_remove_fs_prefix
1 parent 827a7be commit 86e8bd8Copy full SHA for 86e8bd8
fsspec/implementations/prefix.py
@@ -50,7 +50,7 @@ def _remove_fs_prefix(self, path: str) -> Union[str, Sequence[str]]:
50
if isinstance(path, (str, Path)):
51
path = stringify_path(path)
52
protocol, path = split_protocol(path)
53
- path = os.path.relpath(path, start=self.prefix)
+ path = path[len(self.prefix) + 1 :]
54
return protocol + "://" + path if protocol is not None else path
55
elif isinstance(path, Iterable):
56
return [self._remove_fs_prefix(x) for x in path]
0 commit comments