aboutsummaryrefslogtreecommitdiff
path: root/chksum
diff options
context:
space:
mode:
Diffstat (limited to 'chksum')
-rw-r--r--chksum/chksum.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/chksum/chksum.go b/chksum/chksum.go
index b659be0..e21a2a8 100644
--- a/chksum/chksum.go
+++ b/chksum/chksum.go
@@ -12,6 +12,7 @@ import (
"hash"
"io"
"os"
+ "path"
"regexp"
)
@@ -29,7 +30,6 @@ var (
type Checksum struct {
FileName string
- Alg string
Bytes []byte
Hash hash.Hash
}
@@ -70,8 +70,7 @@ func Parse(r io.Reader) (Checklist, error) {
return nil, err
}
cs := Checksum{
- FileName: match[2],
- Alg: match[1],
+ FileName: path.Clean(match[2]),
Bytes: bytes,
Hash: hash(),
}