RawFilePath version of getCurrentDirectory

This commit was sponsored by Jochen Bartl on Patreon
This commit is contained in:
Joey Hess 2020-10-28 16:03:45 -04:00
parent 08cbaee1f8
commit 6c29817748
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 26 additions and 8 deletions

View file

@ -38,6 +38,7 @@ import Utility.InodeCache
import Utility.TimeStamp
import Utility.Attoparsec
import Utility.Path.AbsRel
import qualified Utility.RawFilePath as R
import System.Posix.Types
import qualified Data.Map as M
@ -214,7 +215,7 @@ typeChanged' ps l repo = guardSafeForLsFiles repo $ do
-- git diff returns filenames relative to the top of the git repo;
-- convert to filenames relative to the cwd, like git ls-files.
top <- absPath (repoPath repo)
currdir <- toRawFilePath <$> getCurrentDirectory
currdir <- R.getCurrentDirectory
return (map (\f -> relPathDirToFileAbs currdir $ top P.</> f) fs, cleanup)
where
prefix =