use setCurrentDirectory

On POSIX, this just calls changeWorkingDirectory.
This commit is contained in:
Joey Hess 2013-05-11 19:14:30 -04:00
parent 18bdff3fae
commit 1e2ddcb68a
5 changed files with 8 additions and 18 deletions

View file

@ -9,10 +9,6 @@
module Git.CurrentRepo where
#ifndef __WINDOWS__
import System.Posix.Directory (changeWorkingDirectory)
#endif
import Common
import Git.Types
import Git.Construct
@ -39,11 +35,9 @@ get = do
case wt of
Nothing -> return r
Just d -> do
#ifndef __WINDOWS__
cwd <- getCurrentDirectory
unless (d `dirContains` cwd) $
changeWorkingDirectory d
#endif
setCurrentDirectory d
return $ addworktree wt r
where
pathenv s = do