1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-22 15:57:07 +00:00
restic/internal/restorer/restorer_windows.go

14 lines
415 B
Go
Raw Normal View History

//go:build windows
// +build windows
package restorer
import "strings"
// toComparableFilename returns a filename suitable for equality checks. On Windows, it returns the
// uppercase version of the string. On all other systems, it returns the unmodified filename.
func toComparableFilename(path string) string {
2024-08-11 19:38:15 +00:00
// apparently NTFS internally uppercases filenames for comparison
return strings.ToUpper(path)
}