From ff03dd45c494157aea00239dc3d03e9b01714ce7 Mon Sep 17 00:00:00 2001 From: Stan Date: Thu, 5 Jun 2025 17:59:06 +0200 Subject: [PATCH] Adjust log path to use XDG_STATE_HOME Also move logs/ log/ so that it's more in line with /var/log/ Fixes: #7960 Pull Request: #8045 --- source/ps/GameSetup/Paths.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/ps/GameSetup/Paths.cpp b/source/ps/GameSetup/Paths.cpp index 474364e845..9afba58b2b 100644 --- a/source/ps/GameSetup/Paths.cpp +++ b/source/ps/GameSetup/Paths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -140,13 +140,14 @@ Paths::Paths(const CmdLineArgs& args) const OsPath xdgData = XDG_Path("XDG_DATA_HOME", home, home/".local/share/") / subdirectoryName; const OsPath xdgConfig = XDG_Path("XDG_CONFIG_HOME", home, home/".config/" ) / subdirectoryName; const OsPath xdgCache = XDG_Path("XDG_CACHE_HOME", home, home/".cache/" ) / subdirectoryName; + const OsPath xdgState = XDG_Path("XDG_STATE_HOME", home, home/".local/state/") / subdirectoryName; // We don't make the game vs. user data distinction on Unix m_gameData = xdgData/""; m_userData = m_gameData; m_cache = xdgCache/""; m_config = xdgConfig / "config"/""; - m_logs = xdgConfig / "logs"/""; + m_logs = xdgState / "log"/""; #endif }