Skip to content

Commit defb407

Browse files
authored
fix snapshot recover tar extraction (#12777)
1 parent b476df3 commit defb407

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

agent/utils/files/file_op.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,9 @@ func (f FileOp) TarGzExtractPro(src, dst string, secret string) error {
13321332
global.LOG.Debug(commands)
13331333
}
13341334
cmdMgr := cmd.NewCommandMgr(cmd.WithWorkDir(dst), cmd.WithIgnoreExist1())
1335+
if len(secret) == 0 {
1336+
return cmdMgr.Run("tar", "zxvf", src)
1337+
}
13351338
return cmdMgr.RunBashC(commands)
13361339
}
13371340
func CopyCustomAppFile(srcPath, dstPath string) error {

0 commit comments

Comments
 (0)