From ce28a9af786bdc06b8d5853f1356f4612a646ddf Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Tue, 23 May 2023 18:34:24 +0300 Subject: [PATCH] [#2548] use fileath.Clean on the fs.WalkDirFunc argument to ensure that the same normalizations are applied --- tools/archive/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/archive/create.go b/tools/archive/create.go index 8924c9e7..e9e98e69 100644 --- a/tools/archive/create.go +++ b/tools/archive/create.go @@ -51,7 +51,7 @@ func zipAddFS(w *zip.Writer, fsys fs.FS, skipPaths ...string) error { // skip for _, ignore := range skipPaths { if ignore == name || - strings.HasPrefix(name+string(os.PathSeparator), filepath.Clean(ignore)+string(os.PathSeparator)) { + strings.HasPrefix(filepath.Clean(name)+string(os.PathSeparator), filepath.Clean(ignore)+string(os.PathSeparator)) { return nil } }