From bd2946b992bb456d14162faf5bb31dcb2263eef3 Mon Sep 17 00:00:00 2001 From: "Grok Bot (for George)" Date: Sat, 3 Oct 2026 20:02:25 -0400 Subject: [PATCH] saveas: slash-only base name so titles with ':' survive on Windows --- cmd/verae-print/saveas.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/verae-print/saveas.go b/cmd/verae-print/saveas.go index c753279..1feca2d 100644 --- a/cmd/verae-print/saveas.go +++ b/cmd/verae-print/saveas.go @@ -3,6 +3,7 @@ package main import ( "fmt" "os" + "path" "path/filepath" "strings" "time" @@ -21,7 +22,7 @@ func saveNameFromTitle(title string, now time.Time) string { for _, p := range []string{"Microsoft Word - ", "Microsoft Excel - ", "Microsoft PowerPoint - "} { t = strings.TrimPrefix(t, p) } - t = filepath.Base(strings.ReplaceAll(t, `\`, "/")) + t = path.Base(strings.ReplaceAll(t, `\`, "/")) // slash-only: "a:b" is not a drive here if ext := filepath.Ext(t); ext != "" && len(ext) <= 6 && !strings.ContainsAny(ext, " ") { t = strings.TrimSuffix(t, ext) }