mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-11 12:52:23 +00:00
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:
parent
b4de302cb2
commit
7709198c3b
@ -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| {
|
||||||
|
Loading…
Reference in New Issue
Block a user