summaryrefslogtreecommitdiff
path: root/CmdLine/Seek.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-04-02 01:18:00 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-04-02 01:20:07 -0400
commit69b92b22d9a80055c94d687b7f0810f82776624a (patch)
treefd3de714d4a333c1ff288c8cf7f146909c366203 /CmdLine/Seek.hs
parent9831ae65a5afefb476149645fd7df341c065754c (diff)
Fix truncation of parameters that could occur when using xargs git-annex.
This will only ever result in a few more git-ls-files being run than were run before. (Only 1 more is really needed, but around 10 more are currently run for a max length command line.) So, no need to worry about the extra zombie, or lost laziness due to concat.
Diffstat (limited to 'CmdLine/Seek.hs')
-rw-r--r--CmdLine/Seek.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/CmdLine/Seek.hs b/CmdLine/Seek.hs
index b5726f53e..1db075ec3 100644
--- a/CmdLine/Seek.hs
+++ b/CmdLine/Seek.hs
@@ -215,8 +215,8 @@ seekActions gen = do
seekHelper :: ([FilePath] -> Git.Repo -> IO ([FilePath], IO Bool)) -> [FilePath] -> Annex [FilePath]
seekHelper a params = do
- ll <- inRepo $ \g ->
- runSegmentPaths (\fs -> Git.Command.leaveZombie <$> a fs g) params
+ ll <- inRepo $ \g -> concat <$> forM (segmentXargsOrdered params)
+ (runSegmentPaths (\fs -> Git.Command.leaveZombie <$> a fs g))
forM_ (map fst $ filter (null . snd) $ zip params ll) $ \p ->
unlessM (isJust <$> liftIO (catchMaybeIO $ getSymbolicLinkStatus p)) $
error $ p ++ " not found"