projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Ignore invalid dates (Fixes #894)
[youtube-dl]
/
youtube_dl
/
FileDownloader.py
diff --git
a/youtube_dl/FileDownloader.py
b/youtube_dl/FileDownloader.py
index 72f03c217965bcf7227ec6eac544ac30a1b34d79..f4ce48046f08b21d66fcdecd4e1979cedebfd5dc 100644
(file)
--- a/
youtube_dl/FileDownloader.py
+++ b/
youtube_dl/FileDownloader.py
@@
-322,6
+322,9
@@
class FileDownloader(object):
filetime = timeconvert(timestr)
if filetime is None:
return filetime
+ # Ignore obviously invalid dates
+ if filetime == 0:
+ return
try:
os.utime(filename, (time.time(), filetime))
except: