Skip to content

Commit 8a81c64

Browse files
authored
Fix incorrect path in error message. (#22060)
Also make two essentially identical errors have a consistent message phrasing.
1 parent b2b15a4 commit 8a81c64

File tree

1 file changed

+8
-4
lines changed
  • src/rust/engine/fs/store/src

1 file changed

+8
-4
lines changed

src/rust/engine/fs/store/src/lib.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,9 +1308,8 @@ impl Store {
13081308
.await
13091309
.map_err(|e| {
13101310
format!(
1311-
"Failed to set permissions for {}: {}",
1311+
"Error setting permissions on {}: {e}",
13121312
destination.display(),
1313-
e
13141313
)
13151314
})?;
13161315
}
@@ -1366,9 +1365,14 @@ impl Store {
13661365
destination.display()
13671366
)
13681367
})?;
1369-
tokio::fs::set_permissions(destination, FSPermissions::from_mode(mode))
1368+
tokio::fs::set_permissions(&destination, FSPermissions::from_mode(mode))
13701369
.await
1371-
.map_err(|e| format!("Error setting permissions on {}: {e}", path.display()))?;
1370+
.map_err(|e| {
1371+
format!(
1372+
"Error setting permissions on {}: {e}",
1373+
destination.display()
1374+
)
1375+
})?;
13721376
Ok(())
13731377
}
13741378
None => {

0 commit comments

Comments
 (0)