[fpc-pascal] FreePascal Windows - Force files to write to disk

Jonas Maebe jonas at freepascal.org
Tue Feb 21 23:44:26 CET 2017


James Richters wrote:
> I have a freepascal Windows console application that I recently ported
> over from DOS Turbo Pascal.   I am have a small settings file that I
> write to disk that keeps getting corrupted.  It happens only
> occasionally, but it’s always this one file, no others.    Do I need to
> do something specific to force windows to write the file to disk and not
> have it in some kind of cache or buffer?   I am using the following code
> to write the file:

This reminds me of a bug report from a couple of years back, where
someone else had a somewhat similar weird issue under Windows:
http://bugs.freepascal.org/view.php?id=27670

Do you happen to use Flexraid as well?


Jonas



More information about the fpc-pascal mailing list