Skip to content

Commit bdaac9e

Browse files
committed
use to/from slash
1 parent 779e04f commit bdaac9e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/zip.go

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func unzipFile(src, dest string) (err error) {
3030
// Store filename/path for returning and using later on
3131
fpath := filepath.Join(dest, f.Name)
3232
log.Debugf("unzipping %s", fpath)
33+
fpath = filepath.FromSlash(fpath)
3334

3435
if f.FileInfo().IsDir() {
3536

@@ -145,6 +146,8 @@ func zipFile(fname string, compress bool) (writtenFilename string, err error) {
145146
header.Method = zip.Deflate
146147
}
147148

149+
header.Name = filepath.ToSlash(header.Name)
150+
148151
writer, err = zipWriter.CreateHeader(header)
149152
if err != nil {
150153
return err

0 commit comments

Comments
 (0)