use a subdir of GIT_ANNEX_TMP for ssh connection caching sockets

To prevent any possible collisions with other, non-socket files, like the
xmppgit directory.
This commit is contained in:
Joey Hess 2014-04-20 16:56:01 -04:00
parent dbe1f40f94
commit 2807e14904
Failed to extract signature

View file

@ -103,8 +103,9 @@ sshCacheDir
where
gettmpdir = liftIO $ getEnv "GIT_ANNEX_TMP_DIR"
usetmpdir tmpdir = liftIO $ catchMaybeIO $ do
createDirectoryIfMissing True tmpdir
return tmpdir
let socktmp = tmpdir </> "ssh"
createDirectoryIfMissing True socktmp
return socktmp
portParams :: Maybe Integer -> [CommandParam]
portParams Nothing = []