summaryrefslogtreecommitdiff
path: root/Assistant/Ssh.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Ssh.hs')
-rw-r--r--Assistant/Ssh.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Assistant/Ssh.hs b/Assistant/Ssh.hs
index 7b82f4624..fa481a186 100644
--- a/Assistant/Ssh.hs
+++ b/Assistant/Ssh.hs
@@ -233,7 +233,8 @@ genSshKeyPair = withTmpDir "git-annex-keygen" $ \dir -> do
setupSshKeyPair :: SshKeyPair -> SshData -> IO SshData
setupSshKeyPair sshkeypair sshdata = do
sshdir <- sshDir
- createDirectoryIfMissing True $ parentDir $ sshdir </> sshprivkeyfile
+ createDirectoryIfMissing True $
+ takeDirectory $ sshdir </> sshprivkeyfile
unlessM (doesFileExist $ sshdir </> sshprivkeyfile) $
writeFileProtected (sshdir </> sshprivkeyfile) (sshPrivKey sshkeypair)