Ignore 1970 dates as windows crashes when calling .timestamp()

This commit is contained in:
I-Al-Istannen 2022-01-08 18:14:43 +01:00
parent e32c1f000f
commit eb4de8ae0c

View File

@ -231,7 +231,8 @@ class OutputDirectory:
stat = local_path.stat() stat = local_path.stat()
remote_newer = None remote_newer = None
if mtime := heuristics.mtime: if heuristics.mtime and heuristics.mtime.year > 1970:
mtime = heuristics.mtime
remote_newer = mtime.timestamp() > stat.st_mtime remote_newer = mtime.timestamp() > stat.st_mtime
if remote_newer: if remote_newer:
log.explain("Remote file seems to be newer") log.explain("Remote file seems to be newer")