Skip to content

Commit d109c0d

Browse files
committed
Fix the path error of zip file
1 parent c39acba commit d109c0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/compress/zip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func (z *Zip) ExtractFiles(sourceFile, targetName string) (err error) {
3535
continue
3636
}
3737

38-
if strings.HasPrefix(f.Name, "/"+targetName) {
38+
if strings.HasPrefix(f.Name, targetName) {
3939
var targetFile *os.File
4040
if targetFile, err = os.OpenFile(fmt.Sprintf("%s/%s", filepath.Dir(sourceFile), targetName),
4141
os.O_CREATE|os.O_RDWR, f.Mode()); err != nil {

0 commit comments

Comments
 (0)