diff --git a/mdrsclient/api/folder.py b/mdrsclient/api/folder.py index f5b042d..d8a8783 100644 --- a/mdrsclient/api/folder.py +++ b/mdrsclient/api/folder.py @@ -60,11 +60,12 @@ class FolderApi(BaseApi): self._raise_response_error(response) return True - def destroy(self, id: str) -> bool: + def destroy(self, id: str, recursive: bool) -> bool: # print(self.__class__.__name__ + "::" + sys._getframe().f_code.co_name) url = self.ENTRYPOINT + id + "/" + params = {"recursive": recursive} token_check(self.connection) - response = self.connection.delete(url) + response = self.connection.delete(url, params=params) self._raise_response_error(response) return True diff --git a/mdrsclient/commands/rm.py b/mdrsclient/commands/rm.py index 621081f..99b2b70 100644 --- a/mdrsclient/commands/rm.py +++ b/mdrsclient/commands/rm.py @@ -36,4 +36,4 @@ class RmCommand(BaseCommand): if not args.recursive: raise IllegalArgumentException(f"Cannot remove `{r_path}`: Is a folder.") folder_api = FolderApi(connection) - folder_api.destroy(folder.id) + folder_api.destroy(folder.id, True)