From 75ae06595a6971eb21630928bcdd3f33c06b3ea0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 31 May 2017 16:20:55 -0400 Subject: support parsing options like --to=here Reworked remote name parsing to allow things like that. Command.Move uses it for --to=here, although there's not yet an implementation of that option. This commit was sponsored by Ignacio on Patreon. --- Command/Copy.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Command/Copy.hs') diff --git a/Command/Copy.hs b/Command/Copy.hs index 9b41b17d7..1f35d9ce8 100644 --- a/Command/Copy.hs +++ b/Command/Copy.hs @@ -52,7 +52,7 @@ start o file key = stopUnless shouldCopy $ | autoMode o = want <||> numCopiesCheck file key (<) | otherwise = return True want = case Command.Move.fromToOptions (moveOptions o) of - ToRemote dest -> (Remote.uuid <$> getParsed dest) >>= + Right (ToRemote dest) -> (Remote.uuid <$> getParsed dest) >>= wantSend False (Just key) (AssociatedFile (Just file)) - FromRemote _ -> + Right (FromRemote _) -> wantGet False (Just key) (AssociatedFile (Just file)) -- cgit v1.2.3