indirect: Better behavior when a file in direct mode is not owned by the user running the conversion.
This commit is contained in:
parent
c923c981b9
commit
c45f5fbdb3
4 changed files with 30 additions and 4 deletions
|
@ -13,6 +13,7 @@
|
|||
module Annex.Exception (
|
||||
bracketIO,
|
||||
tryAnnex,
|
||||
tryAnnexIO,
|
||||
throwAnnex,
|
||||
catchAnnex,
|
||||
) where
|
||||
|
@ -30,6 +31,10 @@ bracketIO setup cleanup = M.bracket (liftIO setup) (liftIO . cleanup)
|
|||
tryAnnex :: Annex a -> Annex (Either SomeException a)
|
||||
tryAnnex = M.try
|
||||
|
||||
{- try in the Annex monad, but only catching IO exceptions -}
|
||||
tryAnnexIO :: Annex a -> Annex (Either IOException a)
|
||||
tryAnnexIO = M.try
|
||||
|
||||
{- throw in the Annex monad -}
|
||||
throwAnnex :: Exception e => e -> Annex a
|
||||
throwAnnex = M.throw
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue