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 where
gettmpdir = liftIO $ getEnv "GIT_ANNEX_TMP_DIR" gettmpdir = liftIO $ getEnv "GIT_ANNEX_TMP_DIR"
usetmpdir tmpdir = liftIO $ catchMaybeIO $ do usetmpdir tmpdir = liftIO $ catchMaybeIO $ do
createDirectoryIfMissing True tmpdir let socktmp = tmpdir </> "ssh"
return tmpdir createDirectoryIfMissing True socktmp
return socktmp
portParams :: Maybe Integer -> [CommandParam] portParams :: Maybe Integer -> [CommandParam]
portParams Nothing = [] portParams Nothing = []