From b98b69e8c6d9b873a864b79cff857882f67ee576 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 21 Apr 2012 16:59:49 -0400 Subject: honor core.sharedRepository when making all the other files in the annex Lock files, directories, etc. --- Remote/Helper/Hooks.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Remote') 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 -- cgit v1.2.3