Skip to content

Commit 237aada

Browse files
[hostutil_windows] Remove unix workaround
1 parent 2a32b21 commit 237aada

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

pkg/volume/util/hostutil/hostutil_windows.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929

3030
"golang.org/x/sys/windows"
3131
"k8s.io/klog/v2"
32-
"k8s.io/kubernetes/pkg/util/filesystem"
3332
"k8s.io/mount-utils"
3433
utilpath "k8s.io/utils/path"
3534
)
@@ -103,14 +102,6 @@ func isSystemCannotAccessErr(err error) bool {
103102
func (hu *(HostUtil)) GetFileType(pathname string) (FileType, error) {
104103
filetype, err := getFileType(pathname)
105104

106-
// os.Stat will return a 1920 error (windows.ERROR_CANT_ACCESS_FILE) if we use it on a Unix Socket
107-
// on Windows. In this case, we need to use a different method to check if it's a Unix Socket.
108-
if err == errUnknownFileType || isSystemCannotAccessErr(err) {
109-
if isSocket, errSocket := filesystem.IsUnixDomainSocket(pathname); errSocket == nil && isSocket {
110-
return FileTypeSocket, nil
111-
}
112-
}
113-
114105
return filetype, err
115106
}
116107

0 commit comments

Comments
 (0)