mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
Ignore invalid dates (Fixes #894)
This commit is contained in:
parent
213b715893
commit
bb47437686
@ -322,6 +322,9 @@ def try_utime(self, filename, last_modified_hdr):
|
|||||||
filetime = timeconvert(timestr)
|
filetime = timeconvert(timestr)
|
||||||
if filetime is None:
|
if filetime is None:
|
||||||
return filetime
|
return filetime
|
||||||
|
# Ignore obviously invalid dates
|
||||||
|
if filetime == 0:
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
os.utime(filename, (time.time(), filetime))
|
os.utime(filename, (time.time(), filetime))
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user