#1 2024-02-28 08:54:56

Alek
Member
From: Russia
Registered: 2014-07-04
Posts: 44

Error in the function "AppendToFile"

Hello everyone. I found an error. An example is below

program pAppend;

{$APPTYPE CONSOLE}

uses
  SysUtils, dialogs
  ,mormot.core.os
  ;

  var i:integer;
begin
  for I := 0 to 10 do
    AppendToFile(inttostr(i),'test.log');
  //only the last digit will be written to the "test.log" file   

  {
  in mormot.core.os
  Line 7148     FileSeek64(0, soFromEnd) // append

  need to insert a file's handle "h" to a function

  FileSeek64(h, 0, soFromEnd)
  }
  ShowMessage('ok');
end.

Offline

#2 2024-02-28 09:15:34

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: Error in the function "AppendToFile"

You are right.

It should be fixed now with
https://github.com/synopse/mORMot2/commit/c7e379e0

Offline

Board footer

Powered by FluxBB