{"record":{"id":"65e71dc1413553b7","repo":"golang/go","slug":"is-a-directory","errorCode":null,"errorMessage":"is a directory","messagePattern":"is a directory","errorType":"validation","errorClass":"fs.PathError","httpStatus":null,"severity":"error","filePath":"src/archive/zip/reader.go","lineNumber":958,"sourceCode":"\t\t\treturn strings.Compare(jdir, dir)\n\t\t}\n\t\t// find the last entry with dir\n\t\treturn -1\n\t})\n\treturn files[i:j]\n}\n\ntype openDir struct {\n\te      *fileListEntry\n\tfiles  []fileListEntry\n\toffset int\n}\n\nfunc (d *openDir) Close() error               { return nil }\nfunc (d *openDir) Stat() (fs.FileInfo, error) { return d.e.stat() }\n\nfunc (d *openDir) Read([]byte) (int, error) {\n\treturn 0, &fs.PathError{Op: \"read\", Path: d.e.name, Err: errors.New(\"is a directory\")}\n}\n\nfunc (d *openDir) ReadDir(count int) ([]fs.DirEntry, error) {\n\tn := len(d.files) - d.offset\n\tif count > 0 && n > count {\n\t\tn = count\n\t}\n\tif n == 0 {\n\t\tif count <= 0 {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, io.EOF\n\t}\n\tlist := make([]fs.DirEntry, n)\n\tfor i := range list {\n\t\ts, err := d.files[d.offset+i].stat()\n\t\tif err != nil {\n\t\t\treturn nil, err","sourceCodeStart":940,"sourceCodeEnd":976,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/archive/zip/reader.go#L940-L976","documentation":"Error \"is a directory\" thrown in golang/go.","triggerScenarios":"Thrown at src/archive/zip/reader.go:958 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}