add sync to write function in pddb commands

This commit is contained in:
bunnie 2022-07-29 00:25:01 +08:00
parent 3a5e385b9a
commit 2c815375a1

View file

@ -137,6 +137,7 @@ impl<'a> ShellCmdApi<'a> for PddbCmd {
if val.len() > 0 {
match key.write(&val.as_bytes()[..val.len()]) {
Ok(len) => {
self.pddb.sync().ok();
write!(ret, "Wrote {} bytes to {}:{}", len, dict, keyname).ok();
}
Err(e) => {