Skip to content

[WE-168] Dependency rework #267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
normalize paths from slashes cleaning in unzipping
  • Loading branch information
Roberto Sora committed Nov 27, 2018
commit 7c1f5a7ca355b945fb7458e65b236e483a16fbaf
4 changes: 2 additions & 2 deletions tools/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ func extractZip(log func(msg string), body []byte, location string) (string, err
log(fmt.Sprintf("selected baseDir %s from Zip Archive Content: %v", basedir, dirList))

for _, f := range r.File {
fullname := filepath.Join(location, strings.Replace(filepath.ToSlash(f.Name), filepath.ToSlash(basedir), "", -1))
log(fmt.Sprintf("selected fullname %s from replacing in %s the string %s", fullname, filepath.ToSlash(f.Name), filepath.ToSlash(basedir)))
fullname := filepath.Join(location, strings.Replace(filepath.ToSlash(f.Name), filepath.Clean(filepath.ToSlash(basedir)), "", -1))
log(fmt.Sprintf("selected fullname %s from replacing in %s the string %s", fullname, filepath.ToSlash(f.Name), filepath.Clean(filepath.ToSlash(basedir))))

if f.FileInfo().IsDir() {
os.MkdirAll(fullname, f.FileInfo().Mode().Perm())
Expand Down