Skip to content

Commit 20b58c5

Browse files
author
root
committed
fix create_dir_all error
1 parent dc03dee commit 20b58c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/common/pools.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,10 @@ pub async fn load_all_pools(
113113
from_block: u64,
114114
chunk: u64,
115115
) -> Result<(Vec<Pool>, i64)> {
116+
match create_dir_all("cache") {
117+
_ => {}
118+
}
116119
let cache_file = "cache/.cached-pools.csv";
117-
create_dir_all(cache_file)?;
118-
119120
let file_path = Path::new(cache_file);
120121
let file_exists = file_path.exists();
121122
let file = OpenOptions::new()

0 commit comments

Comments
 (0)