image_index.rs: implement atomic write/rename

This commit is contained in:
Dietmar Maurer
2018-12-16 13:39:21 +01:00
parent 798881a68a
commit 4fbb72a8b4
2 changed files with 49 additions and 4 deletions

View File

@ -45,6 +45,8 @@ fn backup_file(param: Value, _info: &ApiMethod) -> Result<Value, Error> {
Ok(true)
})?;
index.close()?; // commit changes
Ok(Value::Null)
}