← Back to team overview

zim-wiki team mailing list archive

policy question relating to PortableApps.com Zim package -- absolute paths stored in notebooks.list


When the list of registered notebooks (for the Open Notebook dialog box)
changes, Zim writes the list to $XDG_CONFIG_HOME/zim/notebooks.list . The
paths in this file are always absolute paths with respect to the root of the
filesystem (at least on Windows it seems that is the case).

In order for my PortableApps.com Zim package to work when $XDG_CONFIG_HOME
and $HOME move around (different host, different Windows drive letter, etc.)
I had to implement this hack that runs during the Portable Zim launcher:


* Let ~ be the PORTABLE APP ROOT (not user's home folder).
* Look in ~/Data/Notebooks for folders.
* For each folder, make an entry in ~/Data/Config/zim/notebooks.list .
* If a folder named "Default" is found, make that the Default notebook in
notebooks.list .

The launch runs this script, sets $HOME to ~ and $XDG_CONFIG_HOME to
~/Data/Config and then launches zim.exe .

So my question is this: How hard would it be to make Zim write paths in
notebooks.list RELATIVE to $HOME instead of absolute? If it's doable, should
we do it? Should I open a Bug for it?

Just to be clear, prepare_notebook_list.js only executes during the launcher
script for the PORTABLE package, not any other package.

Follow ups