diff options
author | 2011-04-21 10:53:29 -0400 | |
---|---|---|
committer | 2011-04-21 10:53:29 -0400 | |
commit | 45bdb2d4136f2faf61a3fde63477ad5d935583b1 (patch) | |
tree | e9bd21b6447ce38155883e69104fc2e9b9f664ac /Remote/S3real.hs | |
parent | 6fcd3e1ef77d3dc99da30cdf2b82489d4bd3d7df (diff) |
ensure tmp dir exists
Diffstat (limited to 'Remote/S3real.hs')
-rw-r--r-- | Remote/S3real.hs | 2 |
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 |