Skip to content

Commit

Permalink
don't ignore path errors
Browse files Browse the repository at this point in the history
  • Loading branch information
azr committed Jan 8, 2019
1 parent 9c5e467 commit 8747bdc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,14 @@ func (c *Client) checksumFromFile(checksumFile string, src *url.URL) (*fileCheck
}

filename := filepath.Base(src.Path)
absPath, _ := filepath.Abs(src.Path)
relpath, _ := filepath.Rel(filepath.Dir(checksumFileURL.Path), absPath)
absPath, err := filepath.Abs(src.Path)
if err != nil {
return nil, err
}
relpath, err := filepath.Rel(filepath.Dir(checksumFileURL.Path), absPath)
if err != nil {
return nil, err
}

// possible file identifiers:
options := []string{
Expand Down

0 comments on commit 8747bdc

Please sign in to comment.