Bug 1610179 - Remove and recreate the database doesn't actually do anything in RKV safe-mode, r=keeler

Differential Revision: https://phabricator.services.mozilla.com/D60377

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Victor Porof 2020-01-21 18:52:09 +00:00
Родитель 59fae540a5
Коммит 20791b5d6a
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -896,10 +896,16 @@ fn unconditionally_remove_file(path: &Path) -> Result<(), SecurityStateError> {
} }
fn remove_db(path: &Path) -> Result<(), SecurityStateError> { fn remove_db(path: &Path) -> Result<(), SecurityStateError> {
// Remove LMDB-related files.
let db = path.join("data.mdb"); let db = path.join("data.mdb");
unconditionally_remove_file(&db)?; unconditionally_remove_file(&db)?;
let lock = path.join("lock.mdb"); let lock = path.join("lock.mdb");
unconditionally_remove_file(&lock)?; unconditionally_remove_file(&lock)?;
// Remove SafeMode-related files.
let db = path.join("data.safe.bin");
unconditionally_remove_file(&db)?;
Ok(()) Ok(())
} }