summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Command/Fsck.hs3
-rw-r--r--Remote/Rsync.hs2
2 files changed, 4 insertions, 1 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 38b1bbbac..ae21acf8a 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -16,6 +16,7 @@ import qualified Types.Backend
import qualified Types.Key
import qualified Backend
import Annex.Content
+import Annex.Perms
import Logs.Location
import Logs.Trust
import Annex.UUID
@@ -83,8 +84,8 @@ performRemote key file backend numcopies remote =
withtmp a = do
pid <- liftIO getProcessID
t <- fromRepo gitAnnexTmpDir
+ createAnnexDirectory t
let tmp = t </> "fsck" ++ show pid ++ "." ++ keyFile key
- liftIO $ createDirectoryIfMissing True t
let cleanup = liftIO $ catchIO (removeFile tmp) (const noop)
cleanup
cleanup `after` a tmp
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 60cbf4595..df4e0a44f 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -19,6 +19,7 @@ import Remote.Helper.Special
import Remote.Helper.Encryptable
import Crypto
import Utility.RsyncFile
+import Annex.Perms
type RsyncUrl = String
@@ -176,6 +177,7 @@ withRsyncScratchDir :: (FilePath -> Annex Bool) -> Annex Bool
withRsyncScratchDir a = do
pid <- liftIO getProcessID
t <- fromRepo gitAnnexTmpDir
+ createAnnexDirectory t
let tmp = t </> "rsynctmp" </> show pid
nuke tmp
liftIO $ createDirectoryIfMissing True tmp