summaryrefslogtreecommitdiff
path: root/Annex/Direct.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Direct.hs')
-rw-r--r--Annex/Direct.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index 733cb9356..a4839d509 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -155,8 +155,8 @@ mergeDirectCleanup d oldsha newsha = do
- Symlinks are replaced with their content, if it's available. -}
movein k f = do
l <- calcGitLink f k
- liftIO $ replaceFile f $ const $
- createSymbolicLink l f
+ replaceFile f $ const $
+ liftIO $ createSymbolicLink l f
toDirect k f
{- Any new, modified, or renamed files were written to the temp
@@ -181,14 +181,15 @@ toDirectGen k f = do
{- Move content from annex to direct file. -}
updateInodeCache k loc
thawContent loc
- liftIO $ replaceFile f $ moveFile loc
+ replaceFile f $
+ liftIO . moveFile loc
, return Nothing
)
(loc':_) -> ifM (liftIO $ catchBoolIO $ not . isSymbolicLink <$> getSymbolicLinkStatus loc')
{- Another direct file has the content; copy it. -}
- ( return $ Just $ do
- liftIO $ replaceFile f $
- void . copyFileExternal loc'
+ ( return $ Just $
+ replaceFile f $
+ void . liftIO . copyFileExternal loc'
, return Nothing
)