From 850a85915be0e3dd9cf665ce4fa827a11124d71d Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Tue, 5 May 2020 18:48:40 +0200 Subject: [PATCH] Fix #1354 (Error on uploading single book, because of missing rarfile) --- cps/editbooks.py | 2 +- cps/helper.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cps/editbooks.py b/cps/editbooks.py index d66763bf..2204ce1e 100644 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -453,7 +453,7 @@ def upload_single_file(request, book, book_id): "" + uploadText + "") 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): diff --git a/cps/helper.py b/cps/helper.py index 435b1322..c89bdf3d 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -292,6 +292,7 @@ def delete_book_file(book, calibrepath, book_format=None): for file in os.listdir(path): if file.upper().endswith("."+book_format): os.remove(os.path.join(path, file)) + return True, None else: if os.path.isdir(path): if len(next(os.walk(path))[1]):