Il 22/03/2017 13:20, James Richters ha scritto:
No, it is not only freepascal, but not every program either.

A wild guess. The vilain could be the journal logic.

The journal tells that the write operation has not been completed at power off, and restores the last valid version of the file, which was empty, because of the rewrite you performed after assigning.

You might try overwriting the old file instead of clearing it. Something like:

Assign.
Seek to the beginning of the file. (instead of rewrite)
Write whatever you need.
Truncate.
Close.

This will give the journal a different story to cope with. Maybe it will help.

Giuliano



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to