rustjail: Fix clippy error

```
error: file opened with `create`, but `truncate` behavior not defined
```
`truncate(true)` ensures the file is entirely overwritten with new data
which I believe is the behaviour we want

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman 2025-01-28 15:11:15 +00:00
parent b4de302cb2
commit 7709198c3b

View File

@ -836,6 +836,7 @@ fn mount_from(
if !src.is_dir() { if !src.is_dir() {
let _ = OpenOptions::new() let _ = OpenOptions::new()
.create(true) .create(true)
.truncate(true)
.write(true) .write(true)
.open(&dest) .open(&dest)
.map_err(|e| { .map_err(|e| {