From 280c16e7f94058912be42b229dbe9eab597e022e Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Sat, 8 Aug 2026 04:28:38 +0300 Subject: [PATCH] Clarify artifact copy/move examples and paths Update copy and move examples to use full repository paths consistent with info operation, resolving ambiguity. Fixes #101 --- pyartifactory/objects/artifact.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)