mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: drop and remove lockfile when test (#13437)
This commit is contained in:
@ -64,7 +64,7 @@ impl StorageLock {
|
||||
impl Drop for StorageLock {
|
||||
fn drop(&mut self) {
|
||||
// The lockfile is not created in disable-lock mode, so we don't need to delete it.
|
||||
#[cfg(not(feature = "disable-lock"))]
|
||||
#[cfg(any(test, not(feature = "disable-lock")))]
|
||||
if Arc::strong_count(&self.0) == 1 && self.0.file_path.exists() {
|
||||
// TODO: should only happen during tests that the file does not exist: tempdir is
|
||||
// getting dropped first. However, tempdir shouldn't be dropped
|
||||
|
||||
Reference in New Issue
Block a user