The stats plugin will write a txt file summarising statistics to $HOME/.skrooge. This is hardcoded in plugins/generic/skg_statistic/skgstatisticplugin.cpp. Instead, this file should be written to $XDG_STATE_HOME (one could also argue $XDG_CACHE_HOME is appropriate). Of course when this environment variable isn't defined the path should cascade in the usual fashion. Because this is hardcoded it effects all (unpatched) Linux distros.
Hi, The path is not hardcoded. The path is computed by using qt api like this: QString appname = KAboutData::applicationData().componentName(); QDir::home().mkdir("." % appname); QString docUUID = QString(QCryptographicHash::hash(m_currentDocument->getCurrentFileName().toLatin1(), QCryptographicHash::Md5).toHex()); m_file = QDir::homePath() % "/." % appname % "/" % docUUID % ".stats.txt"; So, there is no issue for me.
Hi, yes, that is exactly what I mean. QDir::homePath() % "/." % appname % is equivalent to $HOME/skrooge. Rather CacheLocation should be used (see https://doc.qt.io/qt-5/qstandardpaths.html; $XDG_STATE_HOME doesn't seem to be added yet).
Git commit 2eabe937cfefe7c0bac06288470fd679d8917fec by Stephane MANKOWSKI. Committed on 11/03/2023 at 21:44. Pushed by smankowski into branch 'master'. Stats plugin should use XDG_STATE_HOME rather than the hardcoded .skrooge path to store files M +1 -0 CHANGELOG M +5 -2 plugins/generic/skg_statistic/skgstatisticplugin.cpp https://invent.kde.org/office/skrooge/commit/2eabe937cfefe7c0bac06288470fd679d8917fec