From 883395c399a0996d825711c6d8f29aa49ed07a69 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 30 Mar 2013 18:55:22 -0400 Subject: let's use words and unwords rather than split and intercalate " " --- Command/RecvKey.hs | 2 +- Command/SendKey.hs | 2 +- GitAnnexShell.hs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Command/RecvKey.hs b/Command/RecvKey.hs index c1c11a550..a1c6093e8 100644 --- a/Command/RecvKey.hs +++ b/Command/RecvKey.hs @@ -45,7 +45,7 @@ start key = ifM (inAnnex key) where go tmp = do (opts,_,_) <- getOpt Permute rsyncSafeOptions <$> - maybe [] (split " ") <$> getField "RsyncOptions" + maybe [] words <$> getField "RsyncOptions" ifM (liftIO $ rsyncServerReceive (map Param opts) tmp) ( ifM (isJust <$> Fields.getField Fields.direct) ( directcheck tmp diff --git a/Command/SendKey.hs b/Command/SendKey.hs index 42a0377a3..d0e89aef9 100644 --- a/Command/SendKey.hs +++ b/Command/SendKey.hs @@ -28,7 +28,7 @@ seek = [withKeys start] start :: Key -> CommandStart start key = do (opts,_,_) <- getOpt Permute rsyncSafeOptions <$> - maybe [] (split " ") <$> getField "RsyncOptions" + maybe [] words <$> getField "RsyncOptions" ifM (inAnnex key) ( fieldTransfer Upload key $ \_p -> sendAnnex key rollback $ liftIO . rsyncServerSend (map Param opts) diff --git a/GitAnnexShell.hs b/GitAnnexShell.hs index 61923c373..31912ebbe 100644 --- a/GitAnnexShell.hs +++ b/GitAnnexShell.hs @@ -89,7 +89,7 @@ builtin cmd dir params = do checkDirectory $ Just dir let (params', fieldparams, opts) = partitionParams params fields = filter checkField $ parseFields fieldparams - cmds' = map (newcmd $ intercalate " " opts) cmds + cmds' = map (newcmd $ unwords opts) cmds dispatch False (cmd : params') cmds' options fields header $ Git.Construct.repoAbsPath dir >>= Git.Construct.fromAbsPath where -- cgit v1.2.3