summaryrefslogtreecommitdiff
path: root/Command/Move.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Move.hs')
-rw-r--r--Command/Move.hs14
1 files changed, 4 insertions, 10 deletions
diff --git a/Command/Move.hs b/Command/Move.hs
index fd1ed9019..cc26eecda 100644
--- a/Command/Move.hs
+++ b/Command/Move.hs
@@ -108,17 +108,11 @@ toPerform dest move key = moveLock move key $ do
fromStart :: Remote.Remote Annex -> Bool -> FilePath -> Key -> CommandStart
fromStart src move file key
| move = go
- | otherwise = do
- ishere <- inAnnex key
- if ishere then stop else go
+ | otherwise = stopUnless (inAnnex key) go
where
- go = do
- ok <- fromOk src key
- if ok
- then do
- showMoveAction move file
- next $ fromPerform src move key
- else stop
+ go = stopUnless (fromOk src key) $ do
+ showMoveAction move file
+ next $ fromPerform src move key
fromOk :: Remote.Remote Annex -> Key -> Annex Bool
fromOk src key = do
u <- getUUID