summaryrefslogtreecommitdiff
path: root/Assistant/Ssh.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-01-09 13:11:56 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-01-09 13:11:56 -0400
commit425bc1107aebdb701cdcee44da731dd918cd470d (patch)
tree25bcacb37277b70aa7bd0caaf0fe7c3edc665653 /Assistant/Ssh.hs
parent20c7644a4d85434cf49840ea92fca0c723710c72 (diff)
revert parentDir change
Reverts 2bba5bc22d049272d3328bfa6c452d3e2e50e86c Unfortunately, this caused breakage on Windows, and possibly elsewhere, because parentDir and takeDirectory do not behave the same when there is a trailing directory separator.
Diffstat (limited to 'Assistant/Ssh.hs')
-rw-r--r--Assistant/Ssh.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/Assistant/Ssh.hs b/Assistant/Ssh.hs
index fa481a186..7b82f4624 100644
--- a/Assistant/Ssh.hs
+++ b/Assistant/Ssh.hs
@@ -233,8 +233,7 @@ genSshKeyPair = withTmpDir "git-annex-keygen" $ \dir -> do
setupSshKeyPair :: SshKeyPair -> SshData -> IO SshData
setupSshKeyPair sshkeypair sshdata = do
sshdir <- sshDir
- createDirectoryIfMissing True $
- takeDirectory $ sshdir </> sshprivkeyfile
+ createDirectoryIfMissing True $ parentDir $ sshdir </> sshprivkeyfile
unlessM (doesFileExist $ sshdir </> sshprivkeyfile) $
writeFileProtected (sshdir </> sshprivkeyfile) (sshPrivKey sshkeypair)