DeDRM_tools/Obok_plugin/obok
Aleksa Sarai ad33aea18d
obok: linux: improve Kobo Desktop directory searching
The Kobo Desktop program will (when running under Wine on Linux) put all
of its data in the current working directory. This means that there
may be more than one Kobo.sqlite floating around by the user, which
leads to Obok showing an outdated list of books and the user being
confused by Obok cannot find the full list of books.

Solving this completely appears to be a bit too complicated, so this
patch is a best-effort improvement for the worst cases which can be
caused by this:

 1. If the user deletes the files but Obok has already cached the path,
    previously Obok would just error out rather than trying to search
    for a new Kobo.sqlite path and updating the cache.

 2. We search $HOME before searching /, which speeds up initial usage of
    Obok in the common case (usually Kobo Desktop will be installed in
    ~/.wine/drive_c) and also ensures that we correctly preference the
    current user's Kobo Desktop installation.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2022-02-20 03:16:26 +11:00
..
__init__.py Remove stand-alone apps. Only support the two plugins. 2020-02-16 10:12:25 +00:00
legacy_obok.py Support Python 2.7 and Python 3 winreg imports on Windows 2021-11-16 21:22:13 +01:00
obok.py obok: linux: improve Kobo Desktop directory searching 2022-02-20 03:16:26 +11:00