diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-09-19 17:08:51 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-09-19 17:08:51 -0700 |
| commit | 42c75cfd7372042c5e7de2d8cd83ac064035c449 (patch) | |
| tree | a36721073440b1e6faa40d0a1dd605bba6b56d16 /bp.c | |
| parent | 393778ffabecc8fabadc72b9f0bce5340863406d (diff) | |
Fix for single-arg when it's a directory
Diffstat (limited to 'bp.c')
| -rw-r--r-- | bp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -548,7 +548,7 @@ int main(int argc, char *argv[]) } else if (argv[0]) { // Files pass in as command line args: struct stat statbuf; - if (!argv[1]) // Don't print filename for single-file matching + if (!argv[1] && !(stat(argv[0], &statbuf) == 0 && S_ISDIR(statbuf.st_mode))) // Don't print filename for single-file matching options.print_filenames = false; for ( ; argv[0]; argv++) { if (stat(argv[0], &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) // Symlinks are okay if manually specified |
