| ... | @@ -130,6 +130,7 @@ pub const Iterator = struct { | ... | @@ -130,6 +130,7 @@ pub const Iterator = struct { |
| 130 | if (iter.idx == iter.len) { | 130 | if (iter.idx == iter.len) { |
| 131 | const len = try sys.getdents(@intFromEnum(iter.dir.fd), &iter.buf); | 131 | const len = try sys.getdents(@intFromEnum(iter.dir.fd), &iter.buf); |
| 132 | if (len == 0) return null; | 132 | if (len == 0) return null; |
| | 133 | iter.idx = 0; |
| 133 | iter.len = len; | 134 | iter.len = len; |
| 134 | } | 135 | } |
| 135 | const ent: *align(1) sys.struct_dirent = @ptrCast(&iter.buf[iter.idx]); | 136 | const ent: *align(1) sys.struct_dirent = @ptrCast(&iter.buf[iter.idx]); |