]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Ignore invalid dates (Fixes #894)
authorPhilipp Hagemeister <phihag@phihag.de>
Wed, 19 Jun 2013 20:13:16 +0000 (22:13 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Wed, 19 Jun 2013 20:13:16 +0000 (22:13 +0200)
youtube_dl/FileDownloader.py

index 72f03c217965bcf7227ec6eac544ac30a1b34d79..f4ce48046f08b21d66fcdecd4e1979cedebfd5dc 100644 (file)
@@ -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: