Pārlūkot izejas kodu

Fail if no png files have been produced

This indicates that something has gone wrong.  There should be at least
one.
Lucas Stadler 8 gadi atpakaļ
vecāks
revīzija
ce382d162c
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      go/archive/archive.go

+ 4 - 0
go/archive/archive.go

@ -83,6 +83,10 @@ func main() {
83 83
		exit("filepath.Glob", err)
84 84
	}
85 85
86
	if len(parts) == 0 {
87
		exit("filepath.Glob", fmt.Errorf("no matches"))
88
	}
89
86 90
	h := fmt.Sprintf(".archive/%x.html", buf)
87 91
	f, err = os.OpenFile(h, os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0660)
88 92
	if err != nil {