View Single Post
Old 04-22-2022, 06:33 PM   #1610
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DaveLessnau View Post
I'm having an issue with Modify ePub on Linux (Fedora). The thread where I started talking about the issue is:

https://www.mobileread.com/forums/sh...d.php?t=346383

When I run Modify ePub (which I have set to Remove Broken TOC Entries in NCX File (among other things)) against an ePub, it deletes the contents of the ncx.toc (specifically, everything between the <navMap> tags). At first, I thought the problem was with my thrashing around in the Calibre Editor. But, I just tried it with an epub that it was working with just fine on Windows a week or so ago, and it did the same thing. So, I'm assuming it's something to do with the plugin on Linux.

I don't know if I should reproduce all the data from that other thread in this one. Let me know if you need anything and I'll try to figure out how to do it.

Calibre 5.41 installed via the Binary Install command at:
https://calibre-ebook.com/download_linux

Modify ePub 1.7.0 installed from Calibre's Plugin Manager/Installer thing under Preferences

Operating System: Fedora Linux 35
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.20-200.fc35.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: AMD Radeon RX 6700 XT
That error says that the file referred to in the navpoint isn't in the epub with a valid relative reference. More precisely, it checks that the reference points to a real file in the exploded copy of the epub. The error says that the files "text/Chapter*" don't exist relative to the base of the epub.

There is one possibility I see in the code. The check to see if a file exists checks the lower-case name against the "real" name. However, the code assumes that the path to the temporary epub is lower case, something that might be true on Windows but not on linux. The attached test version fixes that. Does it work for you?

EDIT: removed the test version

Last edited by chaley; 04-23-2022 at 08:35 AM. Reason: replaced the test version
chaley is offline   Reply With Quote