diff options
-rw-r--r-- | CHANGELOG | 7 | ||||
-rw-r--r-- | CmdLine/Seek.hs | 7 |
2 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,10 @@ +git-annex (6.20170301.2) UNRELEASED; urgency=medium + + * Bugfix: Passing a command a filename that does not exist sometimes + did not display an error, when a path to a directory was also passed. + + -- Joey Hess <id@joeyh.name> Thu, 02 Mar 2017 12:51:40 -0400 + git-annex (6.20170301.1) unstable; urgency=medium * Fix reversion in yesterday's release that made SHA1E and MD5E backends diff --git a/CmdLine/Seek.hs b/CmdLine/Seek.hs index 7fc64c528..0afb0e66a 100644 --- a/CmdLine/Seek.hs +++ b/CmdLine/Seek.hs @@ -243,13 +243,12 @@ seekActions gen = mapM_ commandAction =<< gen seekHelper :: ([FilePath] -> Git.Repo -> IO ([FilePath], IO Bool)) -> [FilePath] -> Annex [FilePath] seekHelper a params = do - 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 -> + forM_ params $ \p -> unlessM (isJust <$> liftIO (catchMaybeIO $ getSymbolicLinkStatus p)) $ do toplevelWarning False (p ++ " not found") Annex.incError - return $ concat ll + inRepo $ \g -> concat . concat <$> forM (segmentXargsOrdered params) + (runSegmentPaths (\fs -> Git.Command.leaveZombie <$> a fs g)) notSymlink :: FilePath -> IO Bool notSymlink f = liftIO $ not . isSymbolicLink <$> getSymbolicLinkStatus f |