2
0
Эх сурвалжийг харах

* change mode fmappend to fmoutput in streamopen. Refer to comments in text.inc.

This makes append work in streamio.

git-svn-id: trunk@46268 -

marco 5 жил өмнө
parent
commit
f1dbae577c

+ 9 - 6
packages/fcl-base/src/streamio.pp

@@ -99,12 +99,15 @@ begin
         begin
         InOutFunc:=@StreamWrite;
         FlushFunc:=@StreamWrite;
-        if mode=fmAppend then
-          Try
-            GetStream(F).Seek(0,soFromEnd);
-          except
-            InOutRes:=156;
-          end;
+        if Mode=fmAppend then
+          begin 
+            Mode:=fmOutput; // see comments in text.inc  
+            Try
+              GetStream(F).Seek(0,soFromEnd);
+            except
+              InOutRes:=156;
+            end;
+          end;  
         end;
     end;
     end;