Jonathan M Davis <> changed:

           What    |Removed                     |Added
 Attachment #573 is|0                           |1
           obsolete|                            |

--- Comment #8 from Jonathan M Davis <> 2010-03-02 
23:39:06 PST ---
Created an attachment (id=577)
Now fixes DirIterator and listdir() as well.

I don't know anything about the whole reading from disk reading from disk cache
thing, but it's still I/O of some variety and, as I understand it, is not a
cheap operation, so it's desirable to avoid extraneous stat and lstat calls

Also, I figured out that DirIterator and listdir() did not deal with symlinks
correctly. In particular, they always followed them, which could be very bad in
some situations. So, I'm attaching another version which fixes that problem. It
also makes DirEntry on Linux a bit better. It occurred to me that we might as
well just save the result from stat rather than copying some of its values to
member variables to be used for the properties. That way, we can make the
resulting struct available. It makes the DirEntry struct a bit larger, but it
seems useful enough to me that it should be worth it. However, I didn't add any
more of stat's properties (like inode or block size) to DirEntry since those
are likely used rarely enough that the programmer can just access the stat
struct in such cases. That and it allows DirEntry's API to be mostly the same
between platforms.

As far as I've determined, this fix works on Linux (certainly, all of the unit
tests pass, and all of the other testing that I've done looks good), but I
haven't tested the Windows code at all. Most of the changes are to the Posix
side though, so odds are that the Windows side is okay.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to