savonet/liquidsoap

Can't append to a file on windows with file.write

toots opened this issue · 2 comments

Discussed in #4048

Originally posted by Radio-biscuit July 21, 2024
Hello,

I'm trying to set up a playlist log using file.write (Windows 2.2.4) and I can't seem to stop new data overwriting the original data.

If I use:

file.write(append=true,data="Test one\n","testing.log")
file.write(append=true,data="Next test\n","testing.log")

The file contains just "Next test" when I open it in a text editor. Is this what's supposed to happen or am I missing something? I had a look for answers, but it doesn't seem that anyone else is getting this problem. I feel I'm missing something somewhere.

Thanks, A.

Turned out this is a missing feature on the compiler: ocaml/ocaml#13326

I'll make sure to include the fix in the next released windows build.

This should be fixed now.