diff options
author | Joey Hess <joey@kitenet.net> | 2012-03-14 17:43:34 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-03-14 17:43:34 -0400 |
commit | 60ab3d84e188b8dd3a284d962df25bbee41ff1cb (patch) | |
tree | 768d4f632bab0152dbc1ca72f81fc3b9c7915c0a /Command/Move.hs | |
parent | a4f72c9625486786a4549cf4db1b542ea89da7c7 (diff) |
added ifM and nuked 11 lines of code
no behavior changes
Diffstat (limited to 'Command/Move.hs')
-rw-r--r-- | Command/Move.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Command/Move.hs b/Command/Move.hs index 6b58f711a..8612c9f2d 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -131,13 +131,13 @@ fromOk src key return $ u /= Remote.uuid src && any (== src) remotes fromPerform :: Remote -> Bool -> Key -> CommandPerform fromPerform src move key = moveLock move key $ do - ishere <- inAnnex key - if ishere - then handle move True - else do + ifM (inAnnex key) + ( handle move True + , do showAction $ "from " ++ Remote.name src ok <- getViaTmp key $ Remote.retrieveKeyFile src key handle move ok + ) where handle _ False = stop -- failed handle False True = next $ return True -- copy complete |