If XDG_DATA_HOME is not set, swhks defaults to ~/.local/share/swhks/swhks-{time}.log for its log files. Unfortunately, ~ is not translated dynamically to the HOME user directory path at runtime.
This PR fixes this issue by replacing ~ with a reference to the HOME environment variable. If this variable is not set too, the application exits with an error message, as there does not seem to be a way to recover properly in this case.
If
XDG_DATA_HOME
is not set,swhks
defaults to~/.local/share/swhks/swhks-{time}.log
for its log files. Unfortunately,~
is not translated dynamically to theHOME
user directory path at runtime.This PR fixes this issue by replacing
~
with a reference to theHOME
environment variable. If this variable is not set too, the application exits with an error message, as there does not seem to be a way to recover properly in this case.Closes #157.