diff options
author | Joey Hess <joey@kitenet.net> | 2014-08-20 15:49:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-08-20 15:49:49 -0400 |
commit | 86f9d7734d0c638d4c966fd87a5d7e97759e125b (patch) | |
tree | 303141af9d833e487ec3f53d058091de65d39f7a | |
parent | c29395175d002c3afd5723c7bd0c0875921c1419 (diff) |
fix lockFileShared to actually create lock file
This was a bug, but it was only used for ssh locks and by the hook special
remote locking. At least in the case of ssh locks, the lock files happened
to already exist before this tried to use them, so the bug didn't cause
anything to break.
-rw-r--r-- | Annex/LockFile.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Annex/LockFile.hs b/Annex/LockFile.hs index c527d2ec0..14aa293ae 100644 --- a/Annex/LockFile.hs +++ b/Annex/LockFile.hs @@ -36,7 +36,7 @@ lockFileShared file = go =<< fromLockPool file #ifndef mingw32_HOST_OS mode <- annexFileMode lockhandle <- liftIO $ noUmask mode $ - openFd file ReadOnly (Just mode) defaultFileFlags + openFd file ReadWrite (Just mode) defaultFileFlags liftIO $ setFdOption lockhandle CloseOnExec True liftIO $ waitToSetLock lockhandle (ReadLock, AbsoluteSeek, 0, 0) #else |