Fix #1354 (Error on uploading single book, because of missing rarfile)
This commit is contained in:
parent
fcbeeca305
commit
850a85915b
|
@ -453,7 +453,7 @@ def upload_single_file(request, book, book_id):
|
||||||
"<a href=\"" + url_for('web.show_book', book_id=book.id) + "\">" + uploadText + "</a>")
|
"<a href=\"" + url_for('web.show_book', book_id=book.id) + "\">" + uploadText + "</a>")
|
||||||
|
|
||||||
return uploader.process(
|
return uploader.process(
|
||||||
saved_filename, *os.path.splitext(requested_file.filename))
|
saved_filename, *os.path.splitext(requested_file.filename), config.config_rarfile_location)
|
||||||
|
|
||||||
|
|
||||||
def upload_cover(request, book):
|
def upload_cover(request, book):
|
||||||
|
|
|
@ -292,6 +292,7 @@ def delete_book_file(book, calibrepath, book_format=None):
|
||||||
for file in os.listdir(path):
|
for file in os.listdir(path):
|
||||||
if file.upper().endswith("."+book_format):
|
if file.upper().endswith("."+book_format):
|
||||||
os.remove(os.path.join(path, file))
|
os.remove(os.path.join(path, file))
|
||||||
|
return True, None
|
||||||
else:
|
else:
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
if len(next(os.walk(path))[1]):
|
if len(next(os.walk(path))[1]):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user