summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Assistant/XMPP/Git.hs14
-rw-r--r--doc/design/assistant/android.mdwn3
2 files changed, 14 insertions, 3 deletions
diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs
index 6a50e13f6..f48178985 100644
--- a/Assistant/XMPP/Git.hs
+++ b/Assistant/XMPP/Git.hs
@@ -92,8 +92,7 @@ xmppPush cid gitpush handledeferred = runPush SendPack cid handledeferred $ do
(readpush, Fd outf) <- liftIO createPipe
(Fd controlf, writecontrol) <- liftIO createPipe
- tmp <- liftAnnex $ fromRepo gitAnnexTmpDir
- let tmpdir = tmp </> "xmppgit"
+ tmpdir <- gettmpdir
installwrapper tmpdir
env <- liftIO getEnvironment
@@ -160,6 +159,17 @@ xmppPush cid gitpush handledeferred = runPush SendPack cid handledeferred $ do
, "exec " ++ program ++ " xmppgit"
]
modifyFileMode wrapper $ addModes executeModes
+ {- Use GIT_ANNEX_TMP_DIR if set, since that may be a better temp
+ - dir (ie, not on a crippled filesystem where we can't make
+ - the wrapper executable). -}
+ gettmpdir = do
+ v <- liftIO $ getEnv "GIT_ANNEX_TMP_DIR"
+ case v of
+ Nothing -> do
+ tmp <- liftAnnex $ fromRepo gitAnnexTmpDir
+ return $ tmp </> "xmppgit"
+ Just d -> return $ d </> "xmppgit"
+
type EnvVar = String
diff --git a/doc/design/assistant/android.mdwn b/doc/design/assistant/android.mdwn
index 3ea338c4b..83470c17e 100644
--- a/doc/design/assistant/android.mdwn
+++ b/doc/design/assistant/android.mdwn
@@ -4,7 +4,8 @@ to improve it.
## high-priority TODO
* [[bugs/Android_app_permission_denial_on_startup]]
-* S3 doesn't work
+* S3 doesn't work (at least to Internet Archive:
+ "connect: does not exist (connection refused)")
## TODO