From 49f5db7534e401e0bca0f6a4882ecae9eee0d1ab Mon Sep 17 00:00:00 2001 From: aneesh-n <99904+aneesh-n@users.noreply.github.com> Date: Tue, 3 Dec 2024 22:35:18 +0530 Subject: [PATCH] Remove old comment --- internal/restorer/restorer_test.go | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/internal/restorer/restorer_test.go b/internal/restorer/restorer_test.go index 586ef7bbc..ec52ccb5a 100644 --- a/internal/restorer/restorer_test.go +++ b/internal/restorer/restorer_test.go @@ -205,19 +205,7 @@ func saveDir(t testing.TB, repo restic.BlobSaver, nodes map[string]Node, inode u t.Fatalf("unknown node type %T", node) } } - // // Before saving the tree, ensure any raw JSON messages are properly encoded - // for _, v := range tree.Nodes { - // if strings.Contains(v.Name, ":") { - // // Escape any invalid JSON by converting to string and escaping special characters - // v.Name = strings.ReplaceAll(v.Name, ":", "") - // } - // for k2, v2 := range v.GenericAttributes { - // if strings.Contains(string(v2), ":") { - // // Escape any invalid JSON by converting to string and escaping special characters - // v.GenericAttributes[k2] = []byte(strings.ReplaceAll(string(v2), ":", "\\:")) - // } - // } - // } + id, err := restic.SaveTree(ctx, repo, tree) if err != nil { t.Fatal(err) @@ -226,7 +214,8 @@ func saveDir(t testing.TB, repo restic.BlobSaver, nodes map[string]Node, inode u return id } -func getGenericAttributes(name string, node Node, getFileAttributes func(attr *FileAttributes, isDir bool) map[restic.GenericAttributeType]json.RawMessage, +func getGenericAttributes(name string, node Node, + getFileAttributes func(attr *FileAttributes, isDir bool) map[restic.GenericAttributeType]json.RawMessage, getAdsAttributes func(path string, hasAds bool, isAds bool) map[restic.GenericAttributeType]json.RawMessage) map[restic.GenericAttributeType]json.RawMessage { genericAttributes := getFileAttributes(node.Attributes(), false) if node.HasAds() || node.IsAds() {