www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2670] New: std.file.read() should read files of 0 length

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2670

           Summary: std.file.read() should read files of 0 length
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: bugzilla digitalmars.com


Some files, such as:

char[] thing = cast(char[])std.file.read("/proc/sys/kernel/osrelease");

stat as having 0 size, and so thing[] comes back with 0 length. But if the file
is read anyway with C's read(), there is data in it.


-- 
Feb 16 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2670


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed dmd 1.041 and 2.026


-- 
Mar 11 2009