Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit e191f5b

Browse files
authored
Merge pull request #349 from leonor16resende/rm-global-var
Remove global variable
2 parents a45703e + b9eb899 commit e191f5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/util/tar_utils.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ import (
3131
"github.com/sirupsen/logrus"
3232
)
3333

34-
// Thread safe Map of target:linkname
35-
var hardlinks sync.Map
36-
3734
type OriginalPerm struct {
3835
path string
3936
perm os.FileMode
4037
}
4138

4239
func unpackTar(tr *tar.Reader, path string, whitelist []string) error {
40+
// Thread safe Map of target:linkname
41+
var hardlinks sync.Map
42+
4343
originalPerms := make([]OriginalPerm, 0)
4444
for {
4545
header, err := tr.Next()

0 commit comments

Comments
 (0)