From 1d0594a3615437f47732e698d5a657aa7be46194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Fri, 25 Sep 2026 12:09:39 +0200 Subject: [PATCH] docs(dirs): note that XDG_* is ignored on macOS/Windows and must stay that way --- aw_core/dirs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aw_core/dirs.py b/aw_core/dirs.py index 2527d7f..d27940e 100644 --- a/aw_core/dirs.py +++ b/aw_core/dirs.py @@ -149,6 +149,10 @@ def wrapper(subpath: Optional[str] = None) -> str: return wrapper +# All dirs go through platformdirs, which honors XDG_* on Linux and ignores it +# on macOS/Windows (as does the `dirs` crate used by aw-server-rust). Every +# component must resolve identical paths, so do not special-case XDG_* here +# (see ActivityWatch/aw-client#119); in tests, patch platformdirs instead. @_ensure_returned_path_exists def get_data_dir(module_name: Optional[str] = None) -> str: data_dir = platformdirs.user_data_dir(_get_appname())