www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1725] New: std.stream.BufferedFile.create should use FileMode.OutNew

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

           Summary: std.stream.BufferedFile.create should use
                    FileMode.OutNew
           Product: D
           Version: 2.008
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: wbaxter gmail.com


std.stream.BufferedFile.create uses FileMode.Out by default.  This means that
if you have a big file pre-existing, call create("file") and then write just a
little bit to it, then you will still have a big file with just the initial few
bytes overwritten.  This is almost certainly not what one wants or expect to
happen when they call a method named "BufferedFile.create()".


-- 
Dec 11 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1725


bugzilla digitalmars.com changed:

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





Fixed dmd 1.026 and 2.010


-- 
Feb 16 2008