grep: fix wrong filename in error message
authorDenis Vlasenko <vda.linux@googlemail.com>
Thu, 24 Jan 2008 01:30:36 +0000 (01:30 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Thu, 24 Jan 2008 01:30:36 +0000 (01:30 -0000)
findutils/grep.c

index c2a6a21..4c9582e 100644 (file)
@@ -376,7 +376,7 @@ static int file_action_grep(const char *filename, struct stat *statbuf, void* ma
        FILE *file = fopen(filename, "r");
        if (file == NULL) {
                if (!SUPPRESS_ERR_MSGS)
-                       bb_simple_perror_msg(cur_file);
+                       bb_simple_perror_msg(filename);
                open_errors = 1;
                return 0;
        }