lib/fs: Improve case conflict error message (fixes #7827) (#7829)

This commit is contained in:
tomasz1986 2021-08-02 05:44:49 +09:00 committed by GitHub
parent 37d0ba1660
commit 5a1f6cb813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ type ErrCaseConflict struct {
} }
func (e *ErrCaseConflict) Error() string { func (e *ErrCaseConflict) Error() string {
return fmt.Sprintf(`given name "%v" differs from name in filesystem "%v"`, e.Given, e.Real) return fmt.Sprintf(`remote "%v" uses different upper or lowercase characters than local "%v"; change the casing on either side to match the other`, e.Given, e.Real)
} }
func IsErrCaseConflict(err error) bool { func IsErrCaseConflict(err error) bool {

View File

@ -1203,7 +1203,7 @@ func testPullCaseOnlyDirOrSymlink(t *testing.T, dir bool) {
} }
if errStr, ok := f.tempPullErrors[remote.Name]; !ok { if errStr, ok := f.tempPullErrors[remote.Name]; !ok {
t.Error("missing error for", remote.Name) t.Error("missing error for", remote.Name)
} else if !strings.Contains(errStr, "differs from name") { } else if !strings.Contains(errStr, "uses different upper or lowercase") {
t.Error("unexpected error", errStr, "for", remote.Name) t.Error("unexpected error", errStr, "for", remote.Name)
} }
} }