diff --git a/providers/os/os.go b/providers/os/os.go index 1ebb924..405c463 100644 --- a/providers/os/os.go +++ b/providers/os/os.go @@ -148,12 +148,12 @@ func (this *state) funcWriteFile (name, content string) error { func (this *state) countFiles(name string) (int, error) { name, err := this.document.Rel(name) - if err != nil { return err } + if err != nil { return 0, err } // genuinely can't believe this is the only way to do it, we have to // read their names and everything, all that work just to know how many // files there are, its slightly upsetting files, err := os.ReadDir(name) - if err != nil { return err } + if err != nil { return 0, err } return len(files), nil }