Skip to content

Commit

Permalink
the directory to create Info must contain a file at least
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed Feb 8, 2021
1 parent fd3825a commit 55d5ad3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metainfo/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ func getAllInfoFiles(rootDir string) (files []File, err error) {
return nil
})

if err == nil && len(files) == 0 {
err = fmt.Errorf("no files in the directory '%s'", rootDir)
}

return
}

Expand Down

0 comments on commit 55d5ad3

Please sign in to comment.