mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-06-06 05:49:01 +08:00
Fix last_used in tmp cache not updated
This commit is contained in:
@@ -43,6 +43,12 @@ impl TmpCache {
|
||||
match self.db.get_tmp_cache(url).await? {
|
||||
Some(ent) => {
|
||||
if tokio::fs::try_exists(&ent.path).await.unwrap_or(false) {
|
||||
match self.db.update_tmp_cache(url).await {
|
||||
Ok(_) => {}
|
||||
Err(e) => {
|
||||
log::warn!(target: "tmp_cache", "Failed to update tmp cache entry {} in database: {}", url, e);
|
||||
}
|
||||
}
|
||||
return Ok(PathBuf::from(&ent.path));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user