Improve behavior when a git-annex command is told to operate on a file that doesn't exist. It will now continue to other files specified after that on the command line, and only error out at the end.

This commit is contained in:
Joey Hess 2015-04-30 15:28:17 -04:00
parent 461b967966
commit efb37e7c78
5 changed files with 20 additions and 11 deletions

View file

@ -116,7 +116,10 @@ start file = ifAnnexed file addpresent add
- Lockdown can fail if a file gets deleted, and Nothing will be returned.
-}
lockDown :: FilePath -> Annex (Maybe KeySource)
lockDown = either (\e -> showErr e >> return Nothing) (return . Just) <=< lockDown'
lockDown = either
(\e -> warning (show e) >> return Nothing)
(return . Just)
<=< lockDown'
lockDown' :: FilePath -> Annex (Either IOException KeySource)
lockDown' file = ifM crippledFileSystem