From e32df84ac42aea2ba77167124795b24f864624ba Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 20 Oct 2014 14:47:08 +0300 Subject: [PATCH] Blob store overwriting --- Data/BlobStore.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Data/BlobStore.hs b/Data/BlobStore.hs index a3c440c..2a6f71c 100644 --- a/Data/BlobStore.hs +++ b/Data/BlobStore.hs @@ -130,6 +130,9 @@ cachedS3Store cache creds bucket prefix manager = $ requestBodySource len $ sourceHandle inH) void $ Aws.readResponseIO res + liftIO $ IO.withFile fp IO.ReadMode $ \inH -> withAcquire + (storeWrite' (fileStore cache) key) + (sourceHandle inH $$) else storeWrite' (fileStore cache) key , storeRead' = \key -> if shouldBackup key