summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/utils.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/utils.go b/cmd/podman/utils.go
index 592d7a1d1..c19e6391e 100644
--- a/cmd/podman/utils.go
+++ b/cmd/podman/utils.go
@@ -68,7 +68,8 @@ func aliasFlags(f *pflag.FlagSet, name string) pflag.NormalizedName {
// Check if a file exists and is not a directory
func checkIfFileExists(name string) bool {
file, err := os.Stat(name)
- if os.IsNotExist(err) {
+ // All errors return file == nil
+ if err != nil {
return false
}
return !file.IsDir()