summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-04-21 16:59:49 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-04-21 19:36:03 -0400
commitb98b69e8c6d9b873a864b79cff857882f67ee576 (patch)
tree4ae145f9fe34c5e71424ab3d12dca6ab8070ce41 /Remote
parent7e45712d194aa2b231083c3ccee3668f053e5717 (diff)
honor core.sharedRepository when making all the other files in the annex
Lock files, directories, etc.
Diffstat (limited to 'Remote')
-rw-r--r--Remote/Helper/Hooks.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Remote/Helper/Hooks.hs b/Remote/Helper/Hooks.hs
index 2864a8ed5..de731bd6e 100644
--- a/Remote/Helper/Hooks.hs
+++ b/Remote/Helper/Hooks.hs
@@ -14,6 +14,7 @@ import Types.Remote
import qualified Annex
import Annex.LockPool
import Config
+import Annex.Perms
{- Modifies a remote's access functions to first run the
- annex-start-command hook, and trigger annex-stop-command on shutdown.
@@ -75,7 +76,9 @@ runHooks r starthook stophook a = do
-- succeeds, we're the only process using this remote,
-- so can stop it.
unlockFile lck
- fd <- liftIO $ openFd lck ReadWrite (Just stdFileMode) defaultFileFlags
+ mode <- annexFileMode
+ fd <- liftIO $ noUmask mode $
+ openFd lck ReadWrite (Just mode) defaultFileFlags
v <- liftIO $ tryIO $
setLock fd (WriteLock, AbsoluteSeek, 0, 0)
case v of