fix: 压缩过程忽略 .sock 套接字 (#2706)

Refs #2702
pull/2710/head
ssongliu 2023-10-27 15:05:25 +08:00 committed by GitHub
parent 12dcb4d646
commit abedc724df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -221,6 +221,7 @@ func handleTar(sourceDir, targetDir, name, exclusionRules string) error {
excludes := strings.Split(exclusionRules, ",")
excludeRules := ""
excludes = append(excludes, "*.sock")
for _, exclude := range excludes {
if len(exclude) == 0 {
continue

View File

@ -215,6 +215,7 @@ func handleSnapTar(sourceDir, targetDir, name, exclusionRules string) error {
exStr := ""
excludes := strings.Split(exclusionRules, ";")
excludes = append(excludes, "*.sock")
for _, exclude := range excludes {
if len(exclude) == 0 {
continue