babluboy / bookworm

A simple ebook reader for Elementary OS
GNU General Public License v3.0
1.32k stars 100 forks source link

imported ePub shows "false:Failed to open file " #281

Closed igalic closed 4 years ago

igalic commented 4 years ago

Downloading this ePub and importing it to Bookwork, i'm unable to open it. I get the following error message:

false:Failed to open file “/home/meena/.local/share/com.github.babluboy.bookworm/books/BaroqueAndEanelliEds.QueerUltraviolenceBashbackAnthology/QueerUltraviolence-BashbackAnthology.epub/EPUB/nav.xhtml”: No such file or directory

Indeed, this file does not exist; this is due to how Bookworm seems to be attempting to build the path here.

BECAUSE OH MY HECK that damn BOOK has a / in the title it's NOT ESCAPED (%2F) everywhere:

❰meena❙~/.local/share/com.github.babluboy.bookworm/books❱✔≻ ls -l
total 8
drwxrwxr-x 4 meena meena 4096 Oct 31 14:32  BaroqueAndEanelliEds.QueerUltraviolenceBashbackAnthology%2FQueerUltraviolence-BashbackAnthology.epub/
drwxrwxr-x 4 meena meena 4096 Oct 31 14:38 'Carlisle et al, Benefit Burden and Impact for a Cohort of Post-Approval Cancer Combination Trials (2019).epub'/
❰meena❙~/.local/share/com.github.babluboy.bookworm/books❱✔≻ 
babluboy commented 4 years ago

Thanks for raising this issue, will handle the / in the code with the escape char

babluboy commented 4 years ago

@igalic Added the fix to handle special chars in the file name. If you are happy to test this by building from source, then you can check if the issue is fixed. Otherwise the next release should have the fix

igalic commented 4 years ago

i'd think i'd rather wait for the next release!