I have a method
getThumbnailPath which returns the path to a preview image, as presented TTW (
/++thumbnail++/UID); when the catalog metadata of an object is refreshed, the thumbnail image is checked and, if necessary, (re)created. The
/++thumbnail++/ URLs are excluded from the
DocumentRoot/++thumbnail++ is a symbolic link to
Now I noticed that there is some surprising difference between my development and production servers: In the development setup, the working directory (
os.getcwd()) is the instance directory (which contains the
parts/), while in the productive setup (using
systemctl start myproject.service), it is
parts/instance. This yielded some surprising effects - my thumbnails generation didn't seem to work, while they indeed have been created - just not at the place where Apache expected them.
Is there some "official way" to get the absolute location of the
var/log, but who knows ...) directories, or should I write my own? I'd like to avoid code differences between the both if at all possible.