Package: fbreader Version: 0.12.10dfsg-7 Severity: normal Here's an example of the bug. I start out with some html file, that's really a symlink to a file without any extension:
joey@gnu:/tmp/bar>ls -l bar.html
lrwxrwxrwx 1 joey joey 6 Aug 20 14:38 bar.html -> ../foo
joey@gnu:/tmp/bar>fbreader bar.html
fbreader correctly loads up the file and displays the html.
Now, I exit fbreader, and run it again, relying on it remembering the
last read book:
joey@gnu:/tmp/bar>fbreader
However, what I get now is an empty screen, with "bar" at the top.
strace provides a clue:
joey@gnu:/tmp/bar>grep tmp/bar strace
zsh: exit 1 grep tmp/bar strace
joey@gnu:/tmp/bar>grep tmp/foo strace
7013 stat64("/tmp/foo", {st_mode=S_IFREG|0644, st_size=3, ...}) = 0
7013 readlink("/tmp/foo", 0x970bb9c, 2048) = -1 EINVAL (Invalid argument)
7013 readlink("/tmp/foo", 0x970e7f4, 2048) = -1 EINVAL (Invalid argument)
It seems it's not looking at the symlink anymore, but at the link target.
And, I guess, it's relying on filename extension to determine what type
of file the link target is, and as it has none, is refusing to display
anything.
This is despite storing the symlink it was told to read in books.xml
<group name="/tmp/bar/bar.html">
<option name="BreakType" value="6"/>
<option name="Initialized" value="true"/>
</group>
Since it still looks at /tmp/foo even when I delete the /tmp/bar/bar.html
symlink, it must be storing the readlink value elsewhere, probably in
one of its .db files.
I think it's being too smart for its own good. If given a symlink, it
should just open it.
FWIW, git-annex uses this sort of symlink by default. My suggestion for
any git-annex users wanting to use fbreader is to migrate your ebooks to use
the SHA256E backend, which will include the filename extensions in
the symlink targets that fbreader for some reason relies on.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-3-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages fbreader depends on:
ii libc6 2.13-35
ii libgcc1 1:4.7.1-7
ii libsqlite3-0 3.7.13-1
ii libstdc++6 4.7.1-7
ii libzlcore0.12 0.12.10dfsg-7
ii libzltext0.12 0.12.10dfsg-7
ii libzlui-gtk 0.12.10dfsg-7
ii libzlui-qt4 0.12.10dfsg-7
fbreader recommends no packages.
fbreader suggests no packages.
-- no debconf information
--
see shy jo
signature.asc
Description: Digital signature

