Eryk Sun added the comment:
The resize() method also modifies the file pointer. Instead of fixing that
oversight, I think it should directly set the file's FileEndOfFileInfo and
FileAllocationInfo. For example:
// resize the file
if (!SetFileInformationByHandle(
New submission from benrg :
On Windows, `mmap.mmap(f.fileno(), ...)` has the undocumented side effect of
setting f's file pointer to 0.
The responsible code in mmapmodule is this:
/* Win9x appears to need us seeked to zero */
lseek(fileno, 0, SEEK_SET);
Win9x is no longer supported,