terminal: disable file path case normalization on macOS

Fixes #1088
This commit is contained in:
aarzilli
2018-01-27 15:11:06 +01:00
committed by Derek Parker
parent 9bb8b8c9fa
commit 03139e8f62
2 changed files with 4 additions and 3 deletions

View File

@ -187,7 +187,7 @@ func (t *Term) substitutePath(path string) string {
} }
func crossPlatformPath(path string) string { func crossPlatformPath(path string) string {
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
return strings.ToLower(path) return strings.ToLower(path)
} }
return path return path

View File

@ -38,8 +38,9 @@ func platformCases() []tCase {
{[]tRule{{"/tmp/path", "/new/path2"}}, "/TmP/path/file.go", "/TmP/path/file.go"}, {[]tRule{{"/tmp/path", "/new/path2"}}, "/TmP/path/file.go", "/TmP/path/file.go"},
} }
casesDarwin := []tCase{ casesDarwin := []tCase{
// Should be case-insensitive // Can be either case-sensitive or case-insensitive depending on
{[]tRule{{"/tmp/path", "/new/path2"}}, "/TmP/PaTh/file.go", "/new/path2/file.go"}, // filesystem settings, we always treat it as case-sensitive.
{[]tRule{{"/tmp/path", "/new/path2"}}, "/TmP/PaTh/file.go", "/TmP/PaTh/file.go"},
} }
casesWindows := []tCase{ casesWindows := []tCase{
// Should not depend on separator at the end of rule path // Should not depend on separator at the end of rule path