minor optimisation and warning fix
This commit is contained in:
parent
94ab82bad8
commit
4c22c2261f
1 changed files with 4 additions and 3 deletions
|
@ -206,7 +206,8 @@ toDirectGen k f = do
|
||||||
{- Removes a direct mode file, while retaining its content in the annex. -}
|
{- Removes a direct mode file, while retaining its content in the annex. -}
|
||||||
removeDirect :: Key -> FilePath -> Annex ()
|
removeDirect :: Key -> FilePath -> Annex ()
|
||||||
removeDirect k f = do
|
removeDirect k f = do
|
||||||
locs <- removeAssociatedFile k f
|
otherlocs <- removeAssociatedFile k f
|
||||||
|
unless (null otherlocs) $
|
||||||
unlessM (inAnnex k) $
|
unlessM (inAnnex k) $
|
||||||
moveAnnex k f
|
moveAnnex k f
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue