summaryrefslogtreecommitdiff
path: root/Command/Copy.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Copy.hs')
-rw-r--r--Command/Copy.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Command/Copy.hs b/Command/Copy.hs
index dd5599264..6967c2f93 100644
--- a/Command/Copy.hs
+++ b/Command/Copy.hs
@@ -26,10 +26,11 @@ seek = [withField Command.Move.toOption Remote.byName $ \to ->
- However, --auto mode avoids unnecessary copies, and avoids getting or
- sending non-preferred content. -}
start :: Maybe Remote -> Maybe Remote -> FilePath -> (Key, Backend) -> CommandStart
-start to from file (key, backend) = autoCopies file key (<) $
- stopUnless shouldCopy $
- Command.Move.start to from False file (key, backend)
+start to from file (key, backend) = stopUnless shouldCopy $
+ Command.Move.start to from False file (key, backend)
where
- shouldCopy = case to of
- Nothing -> checkAuto $ wantGet (Just file)
- Just r -> checkAuto $ wantSend (Just file) (Remote.uuid r)
+ shouldCopy = checkAuto (check <||> numCopiesCheck file key (<))
+ check = case to of
+ Nothing -> wantGet False (Just file)
+ Just r -> wantSend False (Just file) (Remote.uuid r)
+