]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/FileDownloader.py
[redtube] move into own file
[youtube-dl.git] / youtube_dl / FileDownloader.py
index 72f03c217965bcf7227ec6eac544ac30a1b34d79..b3a07617cd9553b4bbaf4ea632f65332e8ff0ebf 100644 (file)
@@ -1,8 +1,3 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-from __future__ import absolute_import
-
 import math
 import io
 import os
@@ -322,6 +317,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: