mirror of
https://github.com/nushell/reedline.git
synced 2024-09-11 15:55:50 +03:00
VACUUM after deleting SQLite data (#538)
This commit is contained in:
parent
572a391211
commit
03fdb00d3e
@ -141,6 +141,12 @@ impl History for SqliteBackedHistory {
|
|||||||
.execute("delete from history", params![])
|
.execute("delete from history", params![])
|
||||||
.map_err(map_sqlite_err)?;
|
.map_err(map_sqlite_err)?;
|
||||||
|
|
||||||
|
// VACUUM to ensure that sensitive data is completely erased
|
||||||
|
// instead of being marked as available for reuse
|
||||||
|
self.db
|
||||||
|
.execute("VACUUM", params![])
|
||||||
|
.map_err(map_sqlite_err)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user