Skip to content

Commit

Permalink
Redo mmCIF check again
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Jul 12, 2024
1 parent 5d16b2f commit b493578
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ func ismmCIFFile(filePath string) (bool, error) {
firstLine := ""
scanner := bufio.NewScanner(file)
for scanner.Scan() {
firstLine = scanner.Text()
if strings.TrimSpace(firstLine) != "" {
firstLine = strings.TrimSpace(scanner.Text())
if firstLine != "" {
break
}
}
Expand All @@ -116,7 +116,7 @@ func ismmCIFFile(filePath string) (bool, error) {
return false, errors.New("empty file")
}

if strings.HasPrefix(firstLine, "# ") || strings.HasPrefix(firstLine, "data_") {
if strings.HasPrefix(firstLine, "#") || strings.HasPrefix(firstLine, "data_") {
return true, nil
}
return false, nil
Expand Down

0 comments on commit b493578

Please sign in to comment.