mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-16 23:04:54 +00:00
Escape characters in filename for kepub conversion
This commit is contained in:
parent
2927b5d544
commit
deb1ff37b2
4
cps/tasks/convert.py
Normal file → Executable file
4
cps/tasks/convert.py
Normal file → Executable file
@ -18,7 +18,7 @@
|
||||
|
||||
import os
|
||||
import re
|
||||
from glob import glob
|
||||
import glob
|
||||
from shutil import copyfile, copyfileobj
|
||||
from markupsafe import escape
|
||||
from time import time
|
||||
@ -242,7 +242,7 @@ class TaskConvert(CalibreTask):
|
||||
|
||||
# move file
|
||||
if check == 0:
|
||||
converted_file = glob(os.path.splitext(filename)[0] + "*.kepub.epub")
|
||||
converted_file = glob.glob(glob.escape(os.path.splitext(filename)[0]) + "*.kepub.epub")
|
||||
if len(converted_file) == 1:
|
||||
copyfile(converted_file[0], (file_path + format_new_ext))
|
||||
os.unlink(converted_file[0])
|
||||
|
Loading…
Reference in New Issue
Block a user