diff --git a/cps/editbooks.py b/cps/editbooks.py index f14da1bf..7330572b 100644 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -833,8 +833,8 @@ def upload(): # move cover to final directory, including book id if has_cover: + new_coverpath = os.path.join(config.config_calibre_dir, db_book.path, "cover.jpg") try: - new_coverpath = os.path.join(config.config_calibre_dir, db_book.path, "cover.jpg") copyfile(meta.cover, new_coverpath) os.unlink(meta.cover) except OSError as e: