Skip to content

Commit

Permalink
pkg/systemd: use fileutils.(Le|E)xists
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Apr 19, 2024
1 parent acc78af commit e58972c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/systemd/quadlet/quadlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/containers/podman/v5/pkg/specgenutilexternal"
"github.com/containers/podman/v5/pkg/systemd/parser"
"github.com/containers/storage/pkg/fileutils"
"github.com/containers/storage/pkg/regexp"
)

Expand Down Expand Up @@ -589,7 +590,7 @@ func ConvertContainer(container *parser.UnitFile, names map[string]string, isUse
for _, device := range devices {
if device[0] == '-' {
device = device[1:]
_, err := os.Stat(strings.Split(device, ":")[0])
err := fileutils.Exists(strings.Split(device, ":")[0])
if errors.Is(err, os.ErrNotExist) {
continue
}
Expand Down

0 comments on commit e58972c

Please sign in to comment.