1
0
Fork 0
mirror of synced 2024-05-19 11:42:40 +12:00

Merge pull request #456 from Serene-Arc/bug_fix_455

This commit is contained in:
Serene 2021-06-10 19:01:12 +10:00 committed by GitHub
commit 4be75fd48a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,6 +104,7 @@ class RedditDownloader(RedditConnector):
except OSError as e:
logger.exception(e)
logger.error(f'Failed to write file to {destination} in submission {submission.id}: {e}')
return
creation_time = time.mktime(datetime.fromtimestamp(submission.created_utc).timetuple())
os.utime(destination, (creation_time, creation_time))
self.master_hash_list[resource_hash] = destination