copy_roller: Fix direction
Bug: b/356645484
Change-Id: I71000da9c70ec8f14ad99c46eda6e5dc33b603bd
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/226747
Reviewed-by: Taylor Cramer <cramertj@google.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/recipes/copy_roller.expected/success.json b/recipes/copy_roller.expected/success.json
index 33e5d6f..75469cf 100644
--- a/recipes/copy_roller.expected/success.json
+++ b/recipes/copy_roller.expected/success.json
@@ -1513,7 +1513,7 @@
"--json-output",
"/path/to/tmp/json",
"copy",
- "[START_DIR]/co/path/to/source.txt",
+ "[START_DIR]/project/path/to/source.txt",
"/path/to/tmp/"
],
"infra_step": true,
@@ -1528,7 +1528,7 @@
"/path/to/tmp/json",
"copy",
"v1.0",
- "[START_DIR]/project/path/to/destination.txt"
+ "[START_DIR]/co/path/to/destination.txt"
],
"infra_step": true,
"name": "write"
diff --git a/recipes/copy_roller.py b/recipes/copy_roller.py
index 17afb42..2f92d9b 100644
--- a/recipes/copy_roller.py
+++ b/recipes/copy_roller.py
@@ -55,10 +55,10 @@
root=project_dir,
)
- value = api.file.read_raw('read', checkout.root / props.source_path)
+ value = api.file.read_raw('read', project_dir / props.source_path)
api.file.write_raw(
'write',
- project_dir / props.destination_path,
+ checkout.root / props.destination_path,
value,
)