summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
Diffstat (limited to 'Remote')
-rw-r--r--Remote/S3real.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Remote/S3real.hs b/Remote/S3real.hs
index 2b0234dc2..07e33368e 100644
--- a/Remote/S3real.hs
+++ b/Remote/S3real.hs
@@ -33,6 +33,7 @@ import Remote.Special
import Remote.Encryptable
import Crypto
import Key
+import Utility
remote :: RemoteType Annex
remote = RemoteType {
@@ -113,6 +114,7 @@ storeEncrypted r (cipher, enck) k = s3Action r False $ \(conn, bucket) -> do
-- To get file size of the encrypted content, have to use a temp file.
-- (An alternative would be chunking to to a constant size.)
let tmp = gitAnnexTmpLocation g enck
+ liftIO $ createDirectoryIfMissing True (parentDir tmp)
liftIO $ withEncryptedContent cipher (L.readFile f) $ \s -> L.writeFile tmp s
res <- liftIO $ storeHelper (conn, bucket) r enck tmp
tmp_exists <- liftIO $ doesFileExist tmp