dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnetlib ChangeLog runtime/System/IO/FileStream.cs


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] pnetlib ChangeLog runtime/System/IO/FileStream.cs
Date: Tue, 16 Jan 2007 17:25:21 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    pnetlib
Changes by:     Klaus Treichel <ktreichel>      07/01/16 17:25:21

Modified files:
        .              : ChangeLog 
        runtime/System/IO: FileStream.cs 

Log message:
        2007-01-16  Klaus Treichel  <address@hidden>
        
                * runtime/System/IO/FileStream.cs: Writing in a read/write 
filestream after
                some data was read and the fileposition was changed. (Bug 
#18319)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnetlib/ChangeLog?cvsroot=dotgnu-pnet&r1=1.2460&r2=1.2461
http://cvs.savannah.gnu.org/viewcvs/pnetlib/runtime/System/IO/FileStream.cs?cvsroot=dotgnu-pnet&r1=1.21&r2=1.22

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/ChangeLog,v
retrieving revision 1.2460
retrieving revision 1.2461
diff -u -b -r1.2460 -r1.2461
--- ChangeLog   16 Jan 2007 08:49:59 -0000      1.2460
+++ ChangeLog   16 Jan 2007 17:25:20 -0000      1.2461
@@ -1,5 +1,10 @@
 2007-01-16  Klaus Treichel  <address@hidden>
 
+       * runtime/System/IO/FileStream.cs: Writing in a read/write filestream 
after
+       some data was read and the fileposition was changed. (Bug #18319)
+
+2007-01-16  Klaus Treichel  <address@hidden>
+
        * tests/runtime/System/Runtime/CompilerServices/TestCompilerServices.cs:
        Change the test for running class constructors because the execution of
        class initializers is triggered different now.

Index: runtime/System/IO/FileStream.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/FileStream.cs,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- runtime/System/IO/FileStream.cs     23 Aug 2004 12:40:54 -0000      1.21
+++ runtime/System/IO/FileStream.cs     16 Jan 2007 17:25:21 -0000      1.22
@@ -269,12 +269,6 @@
                        {
                                if(canSeek)
                                {
-                                       if(bufferPosn < bufferLen)
-                                       {
-                                               FileMethods.Seek(handle, 
-bufferPosn,
-                                                                               
 SeekOrigin.Current);
-                                               position -= bufferPosn;
-                                       }
                                        bufferPosn = 0;
                                        bufferLen = 0;
                                }
@@ -292,6 +286,7 @@
                                        }
                                        bufferPosn = 0;
                                }
+                               bufferLen = 0;
                        }
 
        // Set up for a read.
@@ -327,6 +322,7 @@
                                if(!bufferOwnedByWrite)
                                {
                                        FlushReadBuffer();
+                                       FileMethods.Seek(handle, position, 
SeekOrigin.Begin);
                                        bufferOwnedByWrite = true;
                                }
                        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]