mirror of
https://github.com/containers/podman.git
synced 2025-07-01 16:17:06 +08:00
pkg/rootless: use fileutils.(Le|E)xists
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/containers/storage/pkg/fileutils"
|
||||
"github.com/containers/storage/pkg/lockfile"
|
||||
"github.com/moby/sys/user"
|
||||
spec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
@ -16,7 +17,7 @@ import (
|
||||
// TryJoinFromFilePaths. If joining fails, it attempts to delete the specified
|
||||
// file.
|
||||
func TryJoinPauseProcess(pausePidPath string) (bool, int, error) {
|
||||
if _, err := os.Stat(pausePidPath); err != nil {
|
||||
if err := fileutils.Exists(pausePidPath); err != nil {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
return false, -1, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user