diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-07 13:32:52 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-07 13:32:52 -0400 |
commit | b2cb9c7f0f5b713fe9abdfe29eabf6bb82e7b2b1 (patch) | |
tree | 3b99ea5a0b085046a31bdb13d0454d105d887d4b /Command/FromKey.hs | |
parent | 136b9fa41d4e83b90714fc054aca92fa967315ae (diff) | |
parent | d8394ede7b16d9aafcc19885f31d7935250a9bb6 (diff) |
Merge branch 'master' into concurrentprogress
Diffstat (limited to 'Command/FromKey.hs')
-rw-r--r-- | Command/FromKey.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/FromKey.hs b/Command/FromKey.hs index 10484b840..ebc0e6f6e 100644 --- a/Command/FromKey.hs +++ b/Command/FromKey.hs @@ -41,10 +41,10 @@ start _ [] = do start _ _ = error "specify a key and a dest file" massAdd :: CommandPerform -massAdd = go True =<< map words . lines <$> liftIO getContents +massAdd = go True =<< map (separate (== ' ')) . lines <$> liftIO getContents where go status [] = next $ return status - go status ([keyname,f]:rest) = do + go status ((keyname,f):rest) | not (null keyname) && not (null f) = do let key = fromMaybe (error $ "bad key " ++ keyname) $ file2key keyname ok <- perform' key f let !status' = status && ok |