Skip to content

Commit

Permalink
Renames variable to reflect similar name in tar decompress
Browse files Browse the repository at this point in the history
  • Loading branch information
ForestEckhardt authored and ryanmoran committed Apr 10, 2021
1 parent e7d92f7 commit 9955738
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vacation/vacation.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,17 +313,17 @@ func (z ZipArchive) Decompress(destination string) error {
return err
}

content, err := io.ReadAll(fd)
linkname, err := io.ReadAll(fd)
if err != nil {
return err
}

err = checkExtractPath(filepath.Join(filepath.Dir(f.Name), string(content)), destination)
err = checkExtractPath(filepath.Join(filepath.Dir(f.Name), string(linkname)), destination)
if err != nil {
return err
}

err = os.Symlink(string(content), path)
err = os.Symlink(string(linkname), path)
if err != nil {
return fmt.Errorf("failed to unzip symlink: %w", err)
}
Expand Down

0 comments on commit 9955738

Please sign in to comment.