diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-23 18:13:24 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-23 18:13:24 -0400 |
commit | 4bf1a5ef59026a095abf751ea60b586c299aa0b9 (patch) | |
tree | 067cd0813f3f315475b3b958762ed569ae95e8de /Content.hs | |
parent | d75da353b9905bb5757df08520e63607fbfd2073 (diff) |
refactor
Diffstat (limited to 'Content.hs')
-rw-r--r-- | Content.hs | 16 |
1 files changed, 1 insertions, 15 deletions
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 |