Refactored get_temp_dir

bugfixes export_metadata
This commit is contained in:
Ozzie Isaacs
2023-11-11 14:48:59 +01:00
parent b7aaa0f24d
commit cf6810db87
7 changed files with 64 additions and 40 deletions

View File

@@ -18,12 +18,12 @@
import os
import hashlib
from tempfile import gettempdir
from flask_babel import gettext as _
from . import logger, comic, isoLanguages
from .constants import BookMeta
from .helper import split_authors
from .file_helper import get_temp_dir
log = logger.create()
@@ -249,10 +249,7 @@ def get_magick_version():
def upload(uploadfile, rar_excecutable):
tmp_dir = os.path.join(gettempdir(), 'calibre_web')
if not os.path.isdir(tmp_dir):
os.mkdir(tmp_dir)
tmp_dir = get_temp_dir()
filename = uploadfile.filename
filename_root, file_extension = os.path.splitext(filename)