Exactly. When the code was moved from expand_path to expand_var, we kept
the check for the empty string, but expand_var returns the input if it
cannot expand the variables. It’s simply a bug that doesn’t occur on
systems (e.g. TL 2013) where both are defined.
But this variable is not defined under
MiKTeX, and upon seeing that it's not defined, luaotfload is
supposed to put the database in a folder with the path given by the
value of the variable $TEXMFVAR (the default value in MiKTeX on Win
7 is C:\Users\<USERNAME>\AppData\MiKTeX\2.9 and you can test the
value on your system by typing kpsewhich --expand-var=$TEXMFVAR in
the Command Prompt, or by looking in the Roots panel of the MiKTeX
settings application). The bug we've been discussing keeps
luaotfload from doing that, which is why your database ends up where
it does (and the problem doesn't apply to TeX Live, because the
$TEXMFCACHE variable is defined in that setup).
Fwiw version 2.3 went up to CTAN yesterday. You can get the zip at:
https://github.com/lualatex/luaotfload/releases
(choose the tds one). This version introduces incompatible
changes so remember to delete the cache directories after
updating.
Best,
Philipp
Well, I haven't done exhaustive testing, but so far, looks like the beta
code (2.3) is working as it should.
Thanks!!!