Skip to content

Commit

Permalink
checksum: fix parser for file names with whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ivandeex committed May 24, 2021
1 parent 986a762 commit ce7cf16
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/operations/check.go
Expand Up @@ -8,7 +8,6 @@ import (
"io"
"os"
"regexp"
"strings"
"sync"
"sync/atomic"

Expand Down Expand Up @@ -551,12 +550,10 @@ func ParseSumFile(ctx context.Context, sumFile fs.Object) (HashSums, error) {
if err != nil {
return nil, err
}

line := strings.TrimSpace(string(lineBytes))
line := string(lineBytes)
if line == "" {
continue
}
//line = strings.TrimPrefix(line, "\\")

if fields := re.FindStringSubmatch(line); fields != nil {
hashes[fields[2]] = fields[1]
Expand Down

0 comments on commit ce7cf16

Please sign in to comment.