From 1d8437d15161eb40c5f260dab6fa28d38cc6b5bc Mon Sep 17 00:00:00 2001 From: Benjy Weinberger Date: Sat, 8 Mar 2025 16:31:56 -0800 Subject: [PATCH] Fix incorrect path in error message. Also make two essentially identical errors have a consistent message phrasing. --- src/rust/engine/fs/store/src/lib.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/rust/engine/fs/store/src/lib.rs b/src/rust/engine/fs/store/src/lib.rs index 4643ca076e8..7ae0dd79b60 100644 --- a/src/rust/engine/fs/store/src/lib.rs +++ b/src/rust/engine/fs/store/src/lib.rs @@ -1308,9 +1308,8 @@ impl Store { .await .map_err(|e| { format!( - "Failed to set permissions for {}: {}", + "Error setting permissions on {}: {e}", destination.display(), - e ) })?; } @@ -1366,9 +1365,14 @@ impl Store { destination.display() ) })?; - tokio::fs::set_permissions(destination, FSPermissions::from_mode(mode)) + tokio::fs::set_permissions(&destination, FSPermissions::from_mode(mode)) .await - .map_err(|e| format!("Error setting permissions on {}: {e}", path.display()))?; + .map_err(|e| { + format!( + "Error setting permissions on {}: {e}", + destination.display() + ) + })?; Ok(()) } None => {