-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
System.PosixCompat.Files.fileSize is defined to be a FileOffset, just like System.Posix.Files.fileSize.
But, on Windows, maxBound:: FileOffset = 2147483647.
On Linux, it's quite a bit more than this 2 GB!
I have had to avoid using fileSize at al in my program because of this gotcha. (hFileSize doesn't have this problem; it will return the real size of a multi-gb file on Windows).
I don't know how to fix this library. Changing the PosixCompat version of FileStatus to use an Integer would work, but it would break compatability between unix and windows for users of this library. Maybe ghc is at fault for using such a small type for FileOffset on Windows?
Metadata
Metadata
Assignees
Labels
No labels