summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Annex/Exception.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Annex/Exception.hs b/Annex/Exception.hs
index 4d21297b1..de6a23611 100644
--- a/Annex/Exception.hs
+++ b/Annex/Exception.hs
@@ -18,7 +18,11 @@ import Control.Exception hiding (handle, try, throw)
import Common.Annex
-{- Runs an Annex action, with setup and cleanup both in the IO monad. -}
+{- Runs an Annex action, with setup and cleanup both in the IO monad.
+ -
+ - Warning: Currently if the Annex action fails, any changes it has made
+ - to Annex state are discarded.
+ -}
bracketIO :: IO c -> (c -> IO b) -> Annex a -> Annex a
bracketIO setup cleanup go =
liftBaseOp (Control.Exception.bracket setup cleanup) (const go)