mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-23 16:44:18 +02:00
Fix detection of outdated cache
This commit is contained in:
parent
a166502eb4
commit
fb62eaaaad
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ impl Cache {
|
|||
/// Return the number of seconds since the cache directory was last modified.
|
||||
pub fn last_update(&self) -> Option<i64> {
|
||||
if let Ok(cache_dir) = self.get_cache_dir() {
|
||||
if let Ok(metadata) = fs::metadata(cache_dir) {
|
||||
if let Ok(metadata) = fs::metadata(cache_dir.join("tldr-master")) {
|
||||
let mtime = metadata.mtime();
|
||||
let now = time::now_utc().to_timespec();
|
||||
return Some(now.sec - mtime)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue