summaryrefslogtreecommitdiff
path: root/Assistant/Install.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Install.hs')
-rw-r--r--Assistant/Install.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Assistant/Install.hs b/Assistant/Install.hs
index e2d52692e..e30de173c 100644
--- a/Assistant/Install.hs
+++ b/Assistant/Install.hs
@@ -49,7 +49,7 @@ ensureInstalled = go =<< standaloneAppBase
go (Just base) = do
let program = base </> "git-annex"
programfile <- programFile
- createDirectoryIfMissing True (parentDir programfile)
+ createDirectoryIfMissing True (takeDirectory programfile)
writeFile programfile program
#ifdef darwin_HOST_OS
@@ -87,7 +87,7 @@ installWrapper :: FilePath -> String -> IO ()
installWrapper file content = do
curr <- catchDefaultIO "" $ readFileStrict file
when (curr /= content) $ do
- createDirectoryIfMissing True (parentDir file)
+ createDirectoryIfMissing True (takeDirectory file)
viaTmp writeFile file content
modifyFileMode file $ addModes [ownerExecuteMode]