From ab0a6bf30c7777f1026b9201a67295e6c725c7e0 Mon Sep 17 00:00:00 2001 From: Darren Yu Date: Thu, 4 Dec 2025 16:31:28 +0800 Subject: [PATCH] fix(thumb blob path): separators be wrongly modified --- pkg/util/common.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/util/common.go b/pkg/util/common.go index db7035ed..a2e0f0d1 100644 --- a/pkg/util/common.go +++ b/pkg/util/common.go @@ -164,7 +164,11 @@ func ReplaceMagicVar(rawString string, fsSeparator string, pathAvailable bool, b return match case "{blob_path}": if blobAvailable { - return filepath.Dir(completeBlobPath) + fsSeparator + lastSlash := strings.LastIndexAny(completeBlobPath, "/\\") + if lastSlash >= 0 { + return completeBlobPath[:lastSlash] + fsSeparator + } + return fsSeparator } return match default: