Public bug reported:
Binary package hint: epub-utils
I have used lit2epub to convert following file ~/books/bolito.lit
$ lit2epub ~/books/bolito.lit
the resulting file is called ~/books/b.epubo.lit
It looks like there is slight omission in file /usr/bin/lit2epub on line
28
Lines 27 - 31 are following
if [ "x$2" = "x" ]; then
EPUB=$(echo $1 | sed -e 's/.lit/.epub/')
else
EPUB=$2
fi
Command
echo $1 | sed -e 's/.lit/.epub/'
replaces the first occurrence of 'AnyCaracterRepresentedByDot' followed by 'lit'
so, instead of replacig literal string '.lit' it replaces 'olit'
One of solutions might be
echo $1 | sed -e 's/[.]lit/.epub/'
making dot '.' a literal dot
This solution isn't perfect, because while it would correctly rename
'bolito.lit' to 'bolito.epub',
it will still fail to rename 'bolito(.lit)(ver2.0).lit', making it
'bolito(.epub)(ver2.0).lit', which is not what user expects ;-)
Perhaps a better solution would be
echo $1 | sed -e 's/[.]lit$/.epub/'
the dollar character after [.]lit is an anchor metacharacter that represents
the end of the string.
Sorry for not submitting proper diff with suggested change, but I have
never used diff, so this is more foolproof.
Thank you guys for great work!
** Affects: ebook-tools (Ubuntu)
Importance: Undecided
Status: New
--
wrong ebub filename created after conversion
https://bugs.launchpad.net/bugs/661714
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs