|
|
@ -862,6 +862,7 @@ def upload():
|
|
|
|
new_coverpath = os.path.join(config.config_calibre_dir, db_book.path, "cover.jpg")
|
|
|
|
new_coverpath = os.path.join(config.config_calibre_dir, db_book.path, "cover.jpg")
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
copyfile(coverfile, new_coverpath)
|
|
|
|
copyfile(coverfile, new_coverpath)
|
|
|
|
|
|
|
|
if meta.cover:
|
|
|
|
os.unlink(meta.cover)
|
|
|
|
os.unlink(meta.cover)
|
|
|
|
except OSError as e:
|
|
|
|
except OSError as e:
|
|
|
|
log.error("Failed to move cover file %s: %s", new_coverpath, e)
|
|
|
|
log.error("Failed to move cover file %s: %s", new_coverpath, e)
|
|
|
|