diff --git a/docs/source/index.rst b/docs/source/index.rst index c04d52eae..1e103fd04 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -53,7 +53,7 @@ The following libraries use ``fsspec`` internally for path and file handling: maintainable and modular data science code #. `pyxet`_, a Python library for mounting and accessing very large datasets from XetHub -#. `Huggingface🤗 Datasets`_, a popular library to +#. `Huggingface🤗 Datasets`_, a popular library to load&manipulate data for Deep Learning models ``fsspec`` filesystems are also supported by: diff --git a/fsspec/generic.py b/fsspec/generic.py index 4fb58ac5b..9b5917848 100644 --- a/fsspec/generic.py +++ b/fsspec/generic.py @@ -348,6 +348,11 @@ async def _copy( raise NotImplementedError fs = _resolve_fs(path1[0], self.method) fs2 = _resolve_fs(path2[0], self.method) + + # strip all paths here, after resolve... + path1 = [fs._strip_protocol(p) for p in path1] + path2 = [fs2._strip_protocol(p) for p in path2] + # not expanding paths atm., assume call is from rsync() if fs is fs2: # pure remote diff --git a/fsspec/implementations/sftp.py b/fsspec/implementations/sftp.py index 77f7b370c..5f5904890 100644 --- a/fsspec/implementations/sftp.py +++ b/fsspec/implementations/sftp.py @@ -93,6 +93,7 @@ def rmdir(self, path): self.ftp.rmdir(path) def info(self, path): + path = self._strip_protocol(path) stat = self._decode_stat(self.ftp.stat(path)) stat["name"] = path return stat