From 1f9cb8757624993fc5032958c7366680e15b5978 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 28 Jun 2024 11:18:04 +0200 Subject: [PATCH] sys: process_locker: explicitly don't truncate the lock file clippy rightfully complains about a create() with an unspecified truncation behavior. This file has no contents so let's just not truncate it in case we ever want to also have data in it... Signed-off-by: Wolfgang Bumiller --- proxmox-sys/src/process_locker.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/proxmox-sys/src/process_locker.rs b/proxmox-sys/src/process_locker.rs index 4874da80..65d2793a 100644 --- a/proxmox-sys/src/process_locker.rs +++ b/proxmox-sys/src/process_locker.rs @@ -112,6 +112,7 @@ impl ProcessLocker { .create(true) .read(true) .write(true) + .truncate(false) .open(lockfile)?; Ok(Arc::new(Mutex::new(Self {