From a87c1ba05832a56a050068bd934ca6c8542924d8 Mon Sep 17 00:00:00 2001 From: Daniel Zivkovic Date: Sat, 2 May 2026 18:41:50 -0400 Subject: [PATCH] fix(render): use forward slashes in save-path footer for Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The footer line `📎 Raw results saved to ~/Documents\Last30Days\…` mangled the home-relative path on Windows because `f"~/{relative}"` stringifies a `pathlib.Path` with the OS-native separator. The result mixes a Unix tilde with backslashes, which neither File Explorer, PowerShell, nor a `file://` URI can resolve. `Path.as_posix()` always returns forward slashes, which is the convention `~/`-prefixed paths require on every platform. macOS and Linux output is unchanged because their separator is already `/`. Repro on Windows: python3 last30days.py "anything" --emit=compact --save-dir="$HOME/Documents/Last30Days" # before: 📎 Raw results saved to ~/Documents\Last30Days\anything-raw.md # after: 📎 Raw results saved to ~/Documents/Last30Days/anything-raw.md --- skills/last30days/scripts/last30days.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/last30days/scripts/last30days.py b/skills/last30days/scripts/last30days.py index 960cb2d..4efd03b 100644 --- a/skills/last30days/scripts/last30days.py +++ b/skills/last30days/scripts/last30days.py @@ -195,7 +195,7 @@ def compute_save_path_display(save_dir: str, topic: str, suffix: str, emit: str) try: home = _Path.home().resolve() relative = raw.relative_to(home) - return f"~/{relative}" + return f"~/{relative.as_posix()}" except ValueError: return str(raw)