remove workaround
This was needed when absNormPath was not being used on Windows, since path normalization includes removing ./
This commit is contained in:
parent
4e7c65dca0
commit
92edee0b04
1 changed files with 2 additions and 7 deletions
|
@ -48,8 +48,7 @@ asTopFilePath file = TopFilePath file
|
||||||
- it internally.
|
- it internally.
|
||||||
-
|
-
|
||||||
- On Windows, git uses '/' to separate paths stored in the repository,
|
- On Windows, git uses '/' to separate paths stored in the repository,
|
||||||
- despite Windows using '\'. Also, git on windows dislikes paths starting
|
- despite Windows using '\'.
|
||||||
- with "./" or ".\".
|
|
||||||
-
|
-
|
||||||
-}
|
-}
|
||||||
type InternalGitPath = String
|
type InternalGitPath = String
|
||||||
|
@ -58,11 +57,7 @@ toInternalGitPath :: FilePath -> InternalGitPath
|
||||||
#ifndef mingw32_HOST_OS
|
#ifndef mingw32_HOST_OS
|
||||||
toInternalGitPath = id
|
toInternalGitPath = id
|
||||||
#else
|
#else
|
||||||
toInternalGitPath p =
|
toInternalGitPath = replace "\\" "/"
|
||||||
let p' = replace "\\" "/" p
|
|
||||||
in if "./" `isPrefixOf` p'
|
|
||||||
then dropWhile (== '/') (drop 1 p')
|
|
||||||
else p'
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fromInternalGitPath :: InternalGitPath -> FilePath
|
fromInternalGitPath :: InternalGitPath -> FilePath
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue