Skip to content

Commit 7b483b4

Browse files
authored
fix(cli): drop ExEx WAL only if it exists (paradigmxyz#15871)
1 parent 9d99875 commit 7b483b4

File tree

1 file changed

+5
-3
lines changed
  • crates/storage/db-common/src/db_tool

1 file changed

+5
-3
lines changed

crates/storage/db-common/src/db_tool/mod.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,11 @@ impl<N: ProviderNodeTypes> DbTool<N> {
146146
fs::remove_dir_all(static_files_path)?;
147147
fs::create_dir_all(static_files_path)?;
148148

149-
let exex_wal_path = exex_wal_path.as_ref();
150-
info!(target: "reth::cli", "Dropping ExEx WAL at {:?}", exex_wal_path);
151-
fs::remove_dir_all(exex_wal_path)?;
149+
if exex_wal_path.as_ref().exists() {
150+
let exex_wal_path = exex_wal_path.as_ref();
151+
info!(target: "reth::cli", "Dropping ExEx WAL at {:?}", exex_wal_path);
152+
fs::remove_dir_all(exex_wal_path)?;
153+
}
152154

153155
Ok(())
154156
}

0 commit comments

Comments
 (0)