mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 15:35:05 +02:00
Only reject 1970 timestamps on windows
This commit is contained in:
parent
e9d2d05030
commit
e467b38d73
1 changed files with 3 additions and 1 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue