diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-04-20 14:43:43 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-04-20 14:43:43 -0400 |
commit | 5c23c1c2e6904e26b49cce1c9d0a1ba718e5938f (patch) | |
tree | 97f6a7f75f9f94ec8d55def46118936ceaf83e1e /Annex | |
parent | 6d61a2efb27aaed0fa87dd504fb289a9f2c6ebdc (diff) |
Fix bug that prevented annex.sshcaching=false configuration from taking effect when on a crippled filesystem. Thanks, divergentdave.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Ssh.hs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index a97134c79..10efa9f9e 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -101,13 +101,14 @@ sshConnectionCachingParams socketfile = - a different filesystem. -} sshCacheDir :: Annex (Maybe FilePath) sshCacheDir - | SysConfig.sshconnectioncaching = ifM crippledFileSystem - ( maybe (return Nothing) usetmpdir =<< gettmpdir - , ifM (fromMaybe True . annexSshCaching <$> Annex.getGitConfig) - ( Just <$> fromRepo gitAnnexSshDir + | SysConfig.sshconnectioncaching = + ifM (fromMaybe True . annexSshCaching <$> Annex.getGitConfig) + ( ifM crippledFileSystem + ( maybe (return Nothing) usetmpdir =<< gettmpdir + , Just <$> fromRepo gitAnnexSshDir + ) , return Nothing ) - ) | otherwise = return Nothing where gettmpdir = liftIO $ getEnv "GIT_ANNEX_TMP_DIR" |