std.file.listdir doesn't work on directory NTFS directory mounted by NTFS-3G

Walter Bright newshound at digitalmars.com
Sat Feb 24 16:47:22 PST 2007


Daniel Keep wrote:
>> Why std.file.listdir works on FAT32 and not on NTFS ? 

It works on NTFS under Windows, I know, I use it.

> The source code for std.file.listdir comes with the DMD archive; after
> giving it a quick look, it looks like it's just using ordinary linux
> calls: specifically, opendir and readdir.  I find it somewhat hard to
> believe that the code would work on one filesystem but not another if
> Phobos was at fault (kind of like a program failing to load because your
> room is painted blue instead of green -- it shouldn't matter).
> 
> If you're up to it, you might want to try translating the code to C and
> see if it does the same thing.  If it does, then it's an OS problem; if
> it doesn't, then something's screwy with Phobos.  If that's not an
> option, since the source for the function is there, you can always copy
> the code and make sure that the various functions are returning the
> expected values.

You don't need to convert it to C. Just instrument the source code and 
see where it is going wrong.



More information about the Digitalmars-d mailing list