aboutsummaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-04-21 16:01:56 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-04-21 16:01:56 -0400
commit7e45712d194aa2b231083c3ccee3668f053e5717 (patch)
tree3fbeafd9271bc936495dc61a40e515ef8914d47c /Annex
parentb4a5e39ee62020380fc0dcf7aecaaf593d44dba5 (diff)
better file mode setting code
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Content.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 616e4128a..b216b861d 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -337,12 +337,12 @@ preseedTmp key file = go =<< inAnnex key
freezeContent :: FilePath -> Annex ()
freezeContent file = liftIO . go =<< fromRepo getSharedRepository
where
- go GroupShared = do
- preventWrite file
- groupRead file
- go AllShared = do
- preventWrite file
- allRead file
+ go GroupShared = modifyFileMode file $
+ removeModes writeModes .
+ addModes [ownerReadMode, groupReadMode]
+ go AllShared = modifyFileMode file $
+ removeModes writeModes .
+ addModes readModes
go _ = preventWrite file
{- Allows writing to an annexed file that freezeContent was called on