mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
Merge pull request #97576 from aarnaud/fix/stat-windows-socket
use Lstat instead of Stat for unix socket on windows
This commit is contained in:
commit
68b908d785
@ -211,7 +211,10 @@ func (m *ManagerImpl) removeContents(dir string) error {
|
||||
if filePath == m.checkpointFile() {
|
||||
continue
|
||||
}
|
||||
stat, err := os.Stat(filePath)
|
||||
// TODO: Until the bug - https://github.com/golang/go/issues/33357 is fixed, os.stat wouldn't return the
|
||||
// right mode(socket) on windows. Hence deleting the file, without checking whether
|
||||
// its a socket, on windows.
|
||||
stat, err := os.Lstat(filePath)
|
||||
if err != nil {
|
||||
klog.Errorf("Failed to stat file %s: %v", filePath, err)
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user