Only reject 1970 timestamps on windows

This commit is contained in:
I-Al-Istannen 2022-01-09 18:23:00 +01:00
parent e9d2d05030
commit e467b38d73

View File

@ -231,7 +231,9 @@ class OutputDirectory:
stat = local_path.stat()
remote_newer = None
if heuristics.mtime and heuristics.mtime.year > 1970:
# Python on Windows crashes when faced with timestamps around the unix epoch
if heuristics.mtime and (os.name != "nt" or heuristics.mtime.year > 1970):
mtime = heuristics.mtime
remote_newer = mtime.timestamp() > stat.st_mtime
if remote_newer: