mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Ignore 1970 dates as windows crashes when calling .timestamp()
This commit is contained in:
parent
e32c1f000f
commit
eb4de8ae0c
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user