From 237aadab89b1332e3dc94099253bfb6994f6ffe1 Mon Sep 17 00:00:00 2001 From: mansikulkarni96 Date: Mon, 17 Feb 2025 17:34:21 -0500 Subject: [PATCH] [hostutil_windows] Remove unix workaround --- pkg/volume/util/hostutil/hostutil_windows.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkg/volume/util/hostutil/hostutil_windows.go b/pkg/volume/util/hostutil/hostutil_windows.go index 27bc8b212b9..b702d1e7e9b 100644 --- a/pkg/volume/util/hostutil/hostutil_windows.go +++ b/pkg/volume/util/hostutil/hostutil_windows.go @@ -29,7 +29,6 @@ import ( "golang.org/x/sys/windows" "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/util/filesystem" "k8s.io/mount-utils" utilpath "k8s.io/utils/path" ) @@ -103,14 +102,6 @@ func isSystemCannotAccessErr(err error) bool { func (hu *(HostUtil)) GetFileType(pathname string) (FileType, error) { filetype, err := getFileType(pathname) - // os.Stat will return a 1920 error (windows.ERROR_CANT_ACCESS_FILE) if we use it on a Unix Socket - // on Windows. In this case, we need to use a different method to check if it's a Unix Socket. - if err == errUnknownFileType || isSystemCannotAccessErr(err) { - if isSocket, errSocket := filesystem.IsUnixDomainSocket(pathname); errSocket == nil && isSocket { - return FileTypeSocket, nil - } - } - return filetype, err }