diff --git a/fsspec/implementations/smb.py b/fsspec/implementations/smb.py index 7f7ffabfe..e8989b0af 100644 --- a/fsspec/implementations/smb.py +++ b/fsspec/implementations/smb.py @@ -248,7 +248,7 @@ def _rm(self, path): else: smbclient.remove(wpath, port=self._port) - def mv(self, path1, path2, **kwargs): + def mv(self, path1, path2, recursive=None, maxdepth=None, **kwargs): wpath1 = _as_unc_path(self.host, path1) wpath2 = _as_unc_path(self.host, path2) smbclient.rename(wpath1, wpath2, port=self._port, **kwargs) diff --git a/fsspec/implementations/tests/test_smb.py b/fsspec/implementations/tests/test_smb.py index 85ee27577..f186ee128 100644 --- a/fsspec/implementations/tests/test_smb.py +++ b/fsspec/implementations/tests/test_smb.py @@ -118,3 +118,9 @@ def test_makedirs_exist_ok(smb_params): fsmb = fsspec.get_filesystem_class("smb")(**smb_params) fsmb.makedirs("/home/a/b/c") fsmb.makedirs("/home/a/b/c", exist_ok=True) + + +def test_rename_from_upath(smb_params): + fsmb = fsspec.get_filesystem_class("smb")(**smb_params) + fsmb.makedirs("/home/a/b/c", exist_ok=True) + fsmb.mv("/home/a/b/c", "/home/a/b/d", recursive=False, maxdepth=None)