mirror of
https://github.com/containers/podman.git
synced 2025-11-02 23:39:52 +08:00
pkg/machine: use fileutils.(Le|E)xists
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -5,11 +5,11 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/containers/podman/v5/pkg/machine/define"
|
||||
"github.com/containers/storage/pkg/fileutils"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@ -101,7 +101,7 @@ func WaitForSocketWithBackoffs(maxBackoffs int, backoff time.Duration, socketPat
|
||||
backoffWait := backoff
|
||||
logrus.Debugf("checking that %q socket is ready", name)
|
||||
for i := 0; i < maxBackoffs; i++ {
|
||||
_, err := os.Stat(socketPath)
|
||||
err := fileutils.Exists(socketPath)
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user