diff options
Diffstat (limited to 'Remote/Directory.hs')
-rw-r--r-- | Remote/Directory.hs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs index a371a1951..342b5bc57 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -233,15 +233,13 @@ checkPresentGeneric d ps = liftIO $ exportPath :: FilePath -> ExportLocation -> FilePath exportPath d (ExportLocation loc) = d </> loc -storeExportDirectory :: FilePath -> Key -> ExportLocation -> MeterUpdate -> Annex Bool -storeExportDirectory d k loc p = sendAnnex k rollback send +storeExportDirectory :: FilePath -> FilePath -> Key -> ExportLocation -> MeterUpdate -> Annex Bool +storeExportDirectory d src _k loc p = liftIO $ catchBoolIO $ do + createDirectoryIfMissing True dest + withMeteredFile src p (L.writeFile dest) + return True where dest = exportPath d loc - send src = liftIO $ catchBoolIO $ do - createDirectoryIfMissing True dest - withMeteredFile src p (L.writeFile dest) - return True - rollback = liftIO $ nukeFile dest retrieveExportDirectory :: FilePath -> Key -> ExportLocation -> FilePath -> MeterUpdate -> Annex (Bool, Verification) retrieveExportDirectory d _k loc dest p = unVerified $ liftIO $ catchBoolIO $ do |