diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-09 13:11:56 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-09 13:11:56 -0400 |
commit | 425bc1107aebdb701cdcee44da731dd918cd470d (patch) | |
tree | 25bcacb37277b70aa7bd0caaf0fe7c3edc665653 /Assistant/Install.hs | |
parent | 20c7644a4d85434cf49840ea92fca0c723710c72 (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/Install.hs')
-rw-r--r-- | Assistant/Install.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Assistant/Install.hs b/Assistant/Install.hs index e30de173c..e2d52692e 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 (takeDirectory programfile) + createDirectoryIfMissing True (parentDir 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 (takeDirectory file) + createDirectoryIfMissing True (parentDir file) viaTmp writeFile file content modifyFileMode file $ addModes [ownerExecuteMode] |