Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

Commit

Permalink
Fix some err bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
xalanq committed Apr 11, 2019
1 parent 4f0d2ea commit b02abc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ func getCode(args map[string]interface{}, templates []config.CodeTemplate) (code
return
}
paths, err := ioutil.ReadDir(path)
if err != nil {
return
}

for _, path := range paths {
name := path.Name()
Expand Down
2 changes: 1 addition & 1 deletion cmd/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func Parse(args map[string]interface{}) error {
}
return cln.ParseContest(contestID, currentPath)
}
if err := work(); err != nil {
if err = work(); err != nil {
if err = loginAgain(cfg, cln, err); err == nil {
err = work()
}
Expand Down

0 comments on commit b02abc8

Please sign in to comment.