crocodilestick / Calibre-Web-Automated

Calibre-Web but automated and with Calibre features! Fully automate and simplify your eBook set up!
https://github.com/crocodilestick/Calibre-Web-Automated
GNU General Public License v3.0
721 stars 16 forks source link

[bug] convert-library decimated my ebook library #69

Closed talex004 closed 3 weeks ago

talex004 commented 2 months ago

Describe the bug As instructed, I ran convert-library -k to convert my ebook library to epub format. Somehow the script had the permissions to delete, but not to write a copy of the originals. (Or maybe because original-library destination folder didn't exist to begin with?) As a result, it deleted many of the books from (a copy of) my library, without maintaining the originals nor writing the replacement epub file.

To Reproduce N/A

Expected behavior convert-library should NOT delete the original files if it cannot verify that the copy was created successfully, or if cannot verify that the resulting epub was converted successfully.

Screenshots

root@84c7756e7f07:/# convert-library -k
[convert-library]: (1/15)  Converting xxx.mobi...
cp: cannot create regular file '/config/original-library/xxx.mobi': No such file or directory
Upgrading database to version 26...
Cannot read from /config/original-library/xxx.mobi
[convert-library]: (2/15)  Converting xxx.mobi...
sh: 1: Syntax error: "(" unexpected
Cannot read from /config/original-library/xxx.mobi
[convert-library]: (3/15)  Converting xxx.mobi...
cp: cannot create regular file '/config/original-library/xxx.mobi': No such file or directory
Cannot read from /config/original-library/xxx.mobi
...

Configuration(please complete the following information):

Additional context I'm mounting the ebook library through a podman volume, from a NFS server running on TrueNAS. I'm yet to figure out how to setup the correct permissions for this.

jmarmstrong1207 commented 1 month ago

This exactly was my concern with the scripts and I noted this before here in https://github.com/crocodilestick/Calibre-Web-Automated/issues/33. This must be a high priority

jmarmstrong1207 commented 3 weeks ago

This has been fixed in 48b039bb3e9de6d0ff77c4407b1854091e921f5e, v2.1.0