From 607922be1911282b9ecf96d467601e77881d1895 Mon Sep 17 00:00:00 2001 From: eleksir Date: Fri, 27 Mar 2026 09:14:04 +0300 Subject: [PATCH] Make tar creation more crossplatform by adding files always with forward slash path separators --- internal/backer/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/backer/utils.go b/internal/backer/utils.go index e765d4c..4e0f3ab 100644 --- a/internal/backer/utils.go +++ b/internal/backer/utils.go @@ -122,7 +122,7 @@ func CreateTarGzStream(ctx context.Context, filepaths []string) io.ReadCloser { } header.Format = tar.FormatGNU - header.Name = strings.TrimPrefix(filepath.Clean(fpath), string(filepath.Separator)) + header.Name = strings.TrimPrefix(filepath.ToSlash(filepath.Clean(fpath)), "/") mode := st.Mode()