From 46b474267be8b5ffba95f437803ab021200b23b9 Mon Sep 17 00:00:00 2001 From: Wayne Cheng Date: Sat, 6 Jan 2024 22:03:17 +0800 Subject: [PATCH] fixed string replace Signed-off-by: Wayne Cheng --- cli/manifest/store/store.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/manifest/store/store.go b/cli/manifest/store/store.go index e39ac3d4f5..6f3fa3a7e7 100644 --- a/cli/manifest/store/store.go +++ b/cli/manifest/store/store.go @@ -170,13 +170,13 @@ func manifestToFilename(root, manifestList, manifest string) string { } func makeFilesafeName(ref string) string { - fileName := strings.ReplaceAll(ref, ":", "--") - return strings.ReplaceAll(fileName, "/", "__") + fileName := strings.ReplaceAll(ref, ":", "%") + return strings.ReplaceAll(fileName, "/", "#") } func filenameToRefString(filename string) string { - refString := strings.ReplaceAll(filename, "--", ":") - return strings.ReplaceAll(refString, "__", "/") + refString := strings.ReplaceAll(filename, "%", ":") + return strings.ReplaceAll(refString, "#", "/") } type notFoundError struct {