From bb474376868469b5bcbaed6b1667b752ceba6119 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Wed, 19 Jun 2013 22:13:16 +0200 Subject: [PATCH] Ignore invalid dates (Fixes #894) --- youtube_dl/FileDownloader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index 72f03c217..f4ce48046 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -322,6 +322,9 @@ def try_utime(self, filename, last_modified_hdr): 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: