Skip to content

Commit

Permalink
Merge pull request #9 from whatalnk/master
Browse files Browse the repository at this point in the history
use filepath.Dir() instead of path.Dir()
  • Loading branch information
mholt authored Aug 25, 2016
2 parents 0231457 + 29fcc69 commit 9abfedc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func unzipFile(zf *zip.File, destination string) error {
}

func writeNewFile(fpath string, in io.Reader, fm os.FileMode) error {
err := os.MkdirAll(path.Dir(fpath), 0755)
err := os.MkdirAll(filepath.Dir(fpath), 0755)
if err != nil {
return fmt.Errorf("%s: making directory for file: %v", fpath, err)
}
Expand All @@ -159,7 +159,7 @@ func writeNewFile(fpath string, in io.Reader, fm os.FileMode) error {
}

func writeNewSymbolicLink(fpath string, target string) error {
err := os.MkdirAll(path.Dir(fpath), 0755)
err := os.MkdirAll(filepath.Dir(fpath), 0755)
if err != nil {
return fmt.Errorf("%s: making directory for file: %v", fpath, err)
}
Expand Down

0 comments on commit 9abfedc

Please sign in to comment.