dglent / meteo-qt

System tray application for weather status information
GNU General Public License v3.0
82 stars 21 forks source link

spurious log file in $XDG_CONFIG_HOME #138

Open hydrargyrum opened 10 months ago

hydrargyrum commented 10 months ago

According to spec

$XDG_CONFIG_HOME defines the base directory relative to which user-specific configuration files should be stored

So this file should not be there: ~/.config/meteo-qt/meteo-qt.log

This is more suitable:

The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:

  • actions history (logs, history, recently used files, …)
dglent commented 10 months ago

Thanks for underline this, it has been discussed again in the past here: https://github.com/dglent/meteo-qt/issues/49 and i didn't change anything. Maybe i didn"t understand correctly, i will check again

I don't have the $XDG_STATE_HOME in my env variables though in my system (mageia 9, lxqt)

hydrargyrum commented 10 months ago

on many systems, XDG_* variables are not set, but per spec, apps should interpret default values in these cases: ~/.local/state/ for XDG_STATE_HOME. If XDG_CONFIG_HOME is not set, it should default to ~/.config. XDG_STATE_HOME is more recent and less used than XDG_DATA_HOME