diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_install/info/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c index ae62a38..807f960 100644 --- a/usr.sbin/pkg_install/info/main.c +++ b/usr.sbin/pkg_install/info/main.c @@ -187,8 +187,11 @@ main(int argc, char **argv) /* Get all the remaining package names, if any */ while (*argv) { - /* Don't try to apply heuristics if arguments are regexs */ - if (MatchType != MATCH_REGEX) + /* + * Don't try to apply heuristics if arguments are regexs or if + * the argument refers to an existing file. + */ + if (MatchType != MATCH_REGEX && !isfile(*argv)) while ((pkgs_split = strrchr(*argv, (int)'/')) != NULL) { *pkgs_split++ = '\0'; /* |