From a90c8340bc4600b2a36e4b69f1839ced533ef366 Mon Sep 17 00:00:00 2001 From: Benjy Weinberger Date: Sat, 8 Mar 2025 19:59:53 -0800 Subject: [PATCH] Fix incorrect path in error message. (#22060) 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 d3631c91a15..15125e2ea25 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 => {