Skip to content

Commit

Permalink
Relax .dsc checkshums parsing. #71
Browse files Browse the repository at this point in the history
  • Loading branch information
smira committed Mar 13, 2015
1 parent 8e20daa commit 69eff97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deb/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func NewSourcePackageFromControlFile(input Stanza) (*Package, error) {
}
parts := strings.Fields(line)

if len(parts) != 3 {
if len(parts) < 3 {
return fmt.Errorf("unparseable hash sum line: %#v", line)
}

Expand All @@ -133,7 +133,7 @@ func NewSourcePackageFromControlFile(input Stanza) (*Package, error) {
return fmt.Errorf("unable to parse size: %s", err)
}

filename := filepath.Base(parts[2])
filename := filepath.Base(parts[len(parts)-1])

found := false
pos := 0
Expand Down

0 comments on commit 69eff97

Please sign in to comment.