mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
fix: Replace fname.stat().st_mtime
with os.path.getmtime(fname)
for more reliable time comparison
This commit is contained in:
parent
8f773eb3a6
commit
18e9410a1a
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
|
@ -26,7 +27,7 @@ def check_version(io, just_check=False, verbose=False):
|
|||
fname = Path.home() / ".aider" / "caches" / "versioncheck"
|
||||
if not just_check and fname.exists():
|
||||
day = 60 * 60 * 24
|
||||
since = time.time() - fname.stat().st_mtime
|
||||
since = time.time() - os.path.getmtime(fname)
|
||||
if 0 < since < day:
|
||||
if verbose:
|
||||
hours = since / 60 / 60
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue