use new fsync parameter to replace_file and atomic_open_or_create

Depend on proxmox 0.15.0 and proxmox-openid 0.8.1

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
Dietmar Maurer
2021-10-20 14:56:15 +02:00
parent 6b8329ee34
commit e0a19d3313
48 changed files with 73 additions and 57 deletions

View File

@ -24,7 +24,7 @@ pub struct PkgState {
pub fn write_pkg_cache(state: &PkgState) -> Result<(), Error> {
let serialized_state = serde_json::to_string(state)?;
replace_file(APT_PKG_STATE_FN, &serialized_state.as_bytes(), CreateOptions::new())
replace_file(APT_PKG_STATE_FN, &serialized_state.as_bytes(), CreateOptions::new(), false)
.map_err(|err| format_err!("Error writing package cache - {}", err))?;
Ok(())
}