lib/fs: Case insensitive conversion to rel path on windows (fixes #5183) (#5176)

This commit is contained in:
Simon Frei
2018-09-11 22:30:32 +02:00
committed by Jakob Borg
parent 60a6a40175
commit 50ba0fd079
7 changed files with 121 additions and 26 deletions

View File

@@ -320,8 +320,12 @@ func TestWatchIssue4877(t *testing.T) {
{name, NonRemove},
}
volName := filepath.VolumeName(testDirAbs)
if volName == "" {
t.Fatalf("Failed to get volume name for path %v", testDirAbs)
}
origTestFs := testFs
testFs = NewFilesystem(FilesystemTypeBasic, strings.ToLower(testDirAbs[:1])+strings.ToUpper(testDirAbs[1:]))
testFs = NewFilesystem(FilesystemTypeBasic, strings.ToLower(volName)+strings.ToUpper(testDirAbs[len(volName):]))
defer func() {
testFs = origTestFs
}()