mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
use Lstat instead of Stat for unix socket on windows
This commit is contained in:
parent
9406e145c2
commit
6013aaa370
@ -211,7 +211,10 @@ func (m *ManagerImpl) removeContents(dir string) error {
|
|||||||
if filePath == m.checkpointFile() {
|
if filePath == m.checkpointFile() {
|
||||||
continue
|
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 {
|
if err != nil {
|
||||||
klog.Errorf("Failed to stat file %s: %v", filePath, err)
|
klog.Errorf("Failed to stat file %s: %v", filePath, err)
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user