aboutsummaryrefslogtreecommitdiff
path: root/chksum
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-05-03 13:33:38 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-05-03 13:33:38 +0200
commit6f334316175cee251aa8831c3cd795db36737c53 (patch)
tree0f1c18b32d0777b53bde163f7e35a3e335a8a0b7 /chksum
parent2cd8e0e842b667f91babb25d0901cfd68d55ccb2 (diff)
clean path
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(),
}