X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/483a1d1004b64bbaaef2c64c17c6b999009a54d2..ccc36f2f2d89f9115c479db4439aa5c88de5b44a:/bsd/hfs/hfs_vnops.c diff --git a/bsd/hfs/hfs_vnops.c b/bsd/hfs/hfs_vnops.c index be91f25e6..2b1552c43 100644 --- a/bsd/hfs/hfs_vnops.c +++ b/bsd/hfs/hfs_vnops.c @@ -2879,6 +2879,14 @@ hfs_readdir(ap) *ap->a_ncookies = ncookies; *ap->a_cookies = cookies; + + /* handle cookies for "." and ".." */ + if (off == 0) { + cookies[0] = 0; + cookies[1] = sizeof(struct hfsdotentry); + } else if (off == sizeof(struct hfsdotentry)) { + cookies[0] = sizeof(struct hfsdotentry); + } } /* If there are no children then we're done */