From be5caeaf515d4ac0a783b9e1dabb5a6923ad6b87 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 12 May 2020 13:05:06 -0400 Subject: [PATCH] catch more exceptions Just in case a non-IO exception might somehow be thrown. --- Remote/Directory.hs | 2 +- Remote/External.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Remote/Directory.hs b/Remote/Directory.hs index 60247d19cc..0388ceda88 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -410,7 +410,7 @@ retrieveExportWithContentIdentifierM dir loc cid dest mkkey p = storeExportWithContentIdentifierM :: FilePath -> FilePath -> Key -> ExportLocation -> [ContentIdentifier] -> MeterUpdate -> Annex (Either String ContentIdentifier) storeExportWithContentIdentifierM dir src _k loc overwritablecids p = - catchIO go (return . Left . show) + catchNonAsync go (return . Left . show) where go = do liftIO $ createDirectoryUnder dir destdir diff --git a/Remote/External.hs b/Remote/External.hs index 27f6f84047..4995ef50ee 100644 --- a/Remote/External.hs +++ b/Remote/External.hs @@ -627,7 +627,7 @@ startExternal external = do } p <- propgit g basep (Just hin, Just hout, Just herr, ph) <- - createProcess p `catchIO` runerr cmdpath + createProcess p `catchNonAsync` runerr cmdpath stderrelay <- async $ errrelayer herr cv <- newTVarIO $ externalDefaultConfig external ccv <- newTVarIO id