Fix bug when thumbnail directory doesn't exist where first downloaded thumbnail is made a directory

This commit is contained in:
James Taylor 2019-08-11 17:27:55 -07:00
parent 42036f92d2
commit 5a6c65774b

View File

@ -553,7 +553,7 @@ def serve_subscription_thumbnail(thumbnail):
try:
f = open(thumbnail_path, 'wb')
except FileNotFoundError:
os.makedirs(thumbnail_path, exist_ok = True)
os.makedirs(thumbnails_directory, exist_ok = True)
f = open(thumbnail_path, 'wb')
f.write(image)
f.close()