Skip to content

Commit

Permalink
use to/from slash
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Jul 6, 2018
1 parent 779e04f commit bdaac9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func unzipFile(src, dest string) (err error) {
// Store filename/path for returning and using later on
fpath := filepath.Join(dest, f.Name)
log.Debugf("unzipping %s", fpath)
fpath = filepath.FromSlash(fpath)

if f.FileInfo().IsDir() {

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

header.Name = filepath.ToSlash(header.Name)

writer, err = zipWriter.CreateHeader(header)
if err != nil {
return err
Expand Down

0 comments on commit bdaac9e

Please sign in to comment.