diff options
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Move.hs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Command/Move.hs b/Command/Move.hs index f02f32558..9a6b0190e 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -110,14 +110,20 @@ toPerform dest move key = moveLock move key $ do - from the remote. -} fromStart :: Remote.Remote Annex -> Bool -> FilePath -> CommandStart -fromStart src move file = isAnnexed file $ \(key, _) -> do - u <- getUUID - remotes <- Remote.keyPossibilities key - if u == Remote.uuid src || not (any (== src) remotes) - then stop - else do - showMoveAction move file - next $ fromPerform src move key +fromStart src move file + | move == True = isAnnexed file $ \(key, _) -> go key + | otherwise = isAnnexed file $ \(key, _) -> do + ishere <- inAnnex key + if ishere then stop else go key + where + go key = do + u <- getUUID + remotes <- Remote.keyPossibilities key + if u == Remote.uuid src || not (any (== src) remotes) + then stop + else do + showMoveAction move file + next $ fromPerform src move key fromPerform :: Remote.Remote Annex -> Bool -> Key -> CommandPerform fromPerform src move key = moveLock move key $ do ishere <- inAnnex key |