symlinked .cache cause calibre 4 reader fail

Bug #1846834 reported by Anders Larsen on 2019-10-04
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

Symlinked .cache stopped working in calibre 4.

I run Ubuntu Mate 19.04 and I have the root fs on a NVMe drive and /home on a SATA SSD. To improve performance I have ~/.cache on the NVMe (as /opt/.cache) and symlink that folder to ~/.cache.

I started doing this "trick" years back when I had the root fs on my first SATA SSD and /home on spinning rust. And I have kept doing it since then. And it has never been any problems in any apps, including calibre.

However after upgrading to calibre 4 the calibre ebook reader can't open ebooks any more. I get this error:

Traceback (most recent call last):
  File "site-packages/calibre/utils/ipc/simple_worker.py", line 290, in main
  File "site-packages/calibre/srv/render_book.py", line 656, in render
  File "site-packages/calibre/srv/render_book.py", line 207, in __init__
  File "site-packages/calibre/ebooks/oeb/polish/container.py", line 288, in __init__
InvalidBook: Could not locate opf file: u'/opt/.cache/calibre/ev2/t/tmpezZNaM/metadata.opf'

/opt/.cache/calibre/ev2/t/tmpezZNaM does exist and can also be accessed via the symlink as /home/anders/.cache/calibre/ev2/t/tmpezZNaM

Everything else works fine in calibre. Thumbnails are cached fine and so on.

By moving back .cache to ~/.cache instead of symlinking from /opt, everything is fine again. I can then use the new calibre viewer fine.

But if possible I would like to continue be able to place ~/.cache on the fastest drive.

Anders Larsen (gislagard) wrote :

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments