SNAP 8.0.9 Linux issue with user home directory definition

8.0.9 version no longer interprets “tilde user” (~cpeter) as the users’ home directory.

Use of HOME is an acceptable solution since that Linux environment variable points to the absolute path of the users’ home directory: /home/corp/ip/cpeter

This issue was first noticed by these errors when starting snap 8.0.9:

Cannot write timestamp to /var/cache/lastModified/etc
Cannot write timestamp to /var/cache/lastModified/bin
java.io.FileNotFoundException: /var/cache/lastModified/all-checksum.txt (No such file or directory)

And creation of these files/directories in the current working directory, ${PWD}:

.lastModified
lock
config
modules
var
~cpeter

(note: this \~cpeter is created in $PWD and is not correctly interpreted as /home/corp/ip/cpeter, my home directory)

SNAP’s internal default ${USER_HOME}/.snap/ now results in the files/directories created as noted above in ${PWD} (without \~cpeter) when default_userdir is not defined. USER_HOME is not a variable on my CentOS 7 system. It should probably be USERHOME, however the default definition is ~cpeter which now does not work as noted above.

THE SOLUTION is to set: default_userdir=${HOME}/.snap/system in ${snap.home}/etc/snap.conf

snap.userdir in ${snap.home}/etc/snap.properties this parameter does not appear to have any effect, however I also set snap.userdir=${HOME}/.snap/

gpt does not appear to have this issue and correctly uses and places files in ${HOME}/.snap/ regardless(?) of these parameter settings.