commit fcf8ca156c415ee0c3c1b224205e09bddfad562e from: Omar Polo date: Thu Dec 16 14:19:45 2021 UTC allow directory to be read again using offset 0 The documentation says explicitly that the offset is *either* 0 or the last offset plus count; that means that after some read a client can require *again* an offset 0 (i.e. doing a rewinding the directory.) commit - c439bed25a634bde8017633a14b40a9496caf39c commit + fcf8ca156c415ee0c3c1b224205e09bddfad562e blob - fb86658d52346ef5f9c4a628e5fbdb54f844ebf1 blob + d293743df8edb654dccfdcd81b600842f183b63f --- client.c +++ client.c @@ -1274,6 +1274,11 @@ tread(struct np_msg_header *hdr, const uint8_t *data, else np_read(hdr->tag, r, buf); } else { + if (off == 0 && f->offset != 0) { + rewinddir(f->dir); + f->offset = 0; + } + if (off != f->offset) { np_error(hdr->tag, "can't seek in directories"); return;