mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-10 01:13:33 +00:00
Bugfix not unlink generic cover on upload
This commit is contained in:
parent
670cbcd336
commit
49a028a599
@ -862,7 +862,8 @@ 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)
|
||||||
os.unlink(meta.cover)
|
if 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)
|
||||||
flash(_(u"Failed to Move Cover File %(file)s: %(error)s", file=new_coverpath,
|
flash(_(u"Failed to Move Cover File %(file)s: %(error)s", file=new_coverpath,
|
||||||
|
Loading…
Reference in New Issue
Block a user