summaryrefslogtreecommitdiff
path: root/Command/Copy.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Copy.hs')
-rw-r--r--Command/Copy.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Command/Copy.hs b/Command/Copy.hs
index 125e0bb9f..d7625ccdb 100644
--- a/Command/Copy.hs
+++ b/Command/Copy.hs
@@ -9,7 +9,6 @@ module Command.Copy where
import Command
import qualified Command.Move
-import Utility
command :: [Command]
command = [repoCommand "copy" paramPaths seek
@@ -20,9 +19,7 @@ seek = [withNumCopies start]
-- A copy is just a move that does not delete the source file.
-- However, --auto mode avoids unnecessary copies.
-start :: CommandStartAttrFile
-start (file, attr) = isAnnexed file $ \(key, _) ->
+start :: FilePath -> Maybe Int -> CommandStart
+start file numcopies = isAnnexed file $ \(key, _) ->
autoCopies key (<) numcopies $
Command.Move.start False file
- where
- numcopies = readMaybe attr