From 4bf1a5ef59026a095abf751ea60b586c299aa0b9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Sep 2011 18:13:24 -0400 Subject: refactor --- Content.hs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'Content.hs') diff --git a/Content.hs b/Content.hs index e4bbee528..f963c48b4 100644 --- a/Content.hs +++ b/Content.hs @@ -13,8 +13,6 @@ module Content ( getViaTmpUnchecked, withTmp, checkDiskSpace, - preventWrite, - allowWrite, moveAnnex, removeAnnex, fromAnnex, @@ -43,6 +41,7 @@ import Utility import Utility.Conditional import Utility.StatFS import Utility.Path +import Utility.FileMode import Types.Key import Utility.DataUnits import Config @@ -152,19 +151,6 @@ checkDiskSpace' adjustment key = do roughSize storageUnits True n ++ " more (use --force to override this check or adjust annex.diskreserve)" -{- Removes the write bits from a file. -} -preventWrite :: FilePath -> IO () -preventWrite f = unsetFileMode f writebits - where - writebits = foldl unionFileModes ownerWriteMode - [groupWriteMode, otherWriteMode] - -{- Turns a file's write bit back on. -} -allowWrite :: FilePath -> IO () -allowWrite f = do - s <- getFileStatus f - setFileMode f $ fileMode s `unionFileModes` ownerWriteMode - {- Moves a file into .git/annex/objects/ - - What if the key there already has content? This could happen for -- cgit v1.2.3