diff --git a/pyartifactory/objects/artifact.py b/pyartifactory/objects/artifact.py index e1f95b1..9f9c035 100644 --- a/pyartifactory/objects/artifact.py +++ b/pyartifactory/objects/artifact.py @@ -353,7 +353,7 @@ def copy(self, artifact_current_path: str, artifact_new_path: str, dryrun: bool artifact_new_path = artifact_new_path.lstrip("/") dry = 1 if dryrun else 0 - self._post(f"api/copy/{artifact_current_path}?to={artifact_new_path}&dry={dry}") + self._post(f"api/copy/{artifact_current_path}?to={urllib.parse.quote(artifact_new_path, safe='')}&dry={dry}") logger.debug("Artifact %s successfully copied", artifact_current_path) return self.info(artifact_new_path) @@ -369,7 +369,7 @@ def move(self, artifact_current_path: str, artifact_new_path: str, dryrun: bool dry = 1 if dryrun else 0 - self._post(f"api/move/{artifact_current_path}?to={artifact_new_path}&dry={dry}") + self._post(f"api/move/{artifact_current_path}?to={urllib.parse.quote(artifact_new_path, safe='')}&dry={dry}") logger.debug("Artifact %s successfully moved", artifact_current_path) return self.info(artifact_new_path)