Closed Bodigrim closed 9 months ago
Ouch.
We're using the Win32 API proper, which is a bit peculiar.
I'll look at it this weekend.
From a quick glance it seems I was tricked by the posix functions behaving in a certain way:
openFile
by design creates a missing file for every IOMode
except ReadOnly
openExistingFile
never creates the fileopenFile
through withFile
The solution seems to be to use openExistingFile
for all read operations. On posix it doesn't matter, on windows it does.
Or we just change this
to Win32.oPEN_EXISTING
.
Win 10, GHC 9.6.3:
What's worse is that
readFile
also creates an emptydoes-not-exist
file.