Commit 3d7c4894 authored by Andrzej Rybczak's avatar Andrzej Rybczak Committed by Ben Gamari

base: update comment to match the change from e134af01

Reviewers: austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3484
parent 363f7fd4
......@@ -127,9 +127,8 @@ lockImpl h ctx mode block = do
-- We want to lock the whole file without looking up its size to be
-- consistent with what flock does. According to documentation of LockFileEx
-- "locking a region that goes beyond the current end-of-file position is
-- not an error", however some versions of Windows seem to have issues with
-- large regions and set ERROR_INVALID_LOCK_RANGE in such case for
-- mysterious reasons. Work around that by setting only low 32 bits.
-- not an error", hence we pass maximum value as the number of bytes to
-- lock.
fix $ \retry -> c_LockFileEx wh flags 0 0xffffffff 0xffffffff ovrlpd >>= \case
True -> return True
False -> getLastError >>= \err -> if
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment