mirror of
https://github.com/Garmelon/PFERD.git
synced 2025-07-12 06:02:31 +02:00
Only reject 1970 timestamps on windows
This commit is contained in:
@ -231,7 +231,9 @@ class OutputDirectory:
|
|||||||
stat = local_path.stat()
|
stat = local_path.stat()
|
||||||
|
|
||||||
remote_newer = None
|
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
|
mtime = heuristics.mtime
|
||||||
remote_newer = mtime.timestamp() > stat.st_mtime
|
remote_newer = mtime.timestamp() > stat.st_mtime
|
||||||
if remote_newer:
|
if remote_newer:
|
||||||
|
Reference in New Issue
Block a user