Bug 2670 – std.file.read() should read files of 0 length

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2009-02-16T03:50:00Z
Last change time
2015-06-09T05:15:10Z
Assigned to
bugzilla
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2009-02-16T03:50:31Z
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.
Comment #1 by bugzilla — 2009-03-11T14:53:33Z
Fixed dmd 1.041 and 2.026