[Issue 1635] DirEntry.isfile() and DirEntry.isdir() broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 25 18:10:33 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=1635


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #6 from Jonathan M Davis <jmdavisProg at gmx.com> 2010-09-25 18:09:50 PDT ---
See also bug# 4929. Currently, on Linux/Posix, DirEntry use d_type from readdir
to set its file type, and if you'll look at the man page for readdir, it
specifically says that d_type is not supported by all file system types.
DirEntry really should be using stat if d_type wasn't set properly. My patch in
bug# 3848 makes it so that while it still uses d_type for the file type if it
was set correctly, it uses stat instead of d_type if d_type is DT_UNKNOWN.

The only place that I'm sure that I've run into this problem (and consistently)
is with /usr/share/zoneinfo, but I think that it's very nature makes it so that
it's only going to fail under certain types of situations or on certain types
of systems.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list