imemory_ondisk: Don't fail write under any circumstances if locking is disabled (#2791)

* imemory_ondisk: Don't fail write under any circumstances if locking is disabled

* fmt

* inmemory_ondisk: Add a log message on failure

* clippy'

* micro optimization
This commit is contained in:
s1341 2024-12-24 15:22:01 +02:00 committed by GitHub
parent 6927d61a89
commit 9b4cd51c63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -442,7 +442,12 @@ impl<I> InMemoryOnDiskCorpus<I> {
*testcase.metadata_path_mut() = Some(metafile_path); *testcase.metadata_path_mut() = Some(metafile_path);
} }
self.store_input_from(testcase)?; if let Err(err) = self.store_input_from(testcase) {
if self.locking {
return Err(err);
}
log::error!("An error occurred when trying to write a testcase without locking: {err}");
}
Ok(()) Ok(())
} }