* ext.c (regex_check_type): Recognize and skip "/dev/stdin:"

that can apprear in the output of new versions of file.
This commit is contained in:
Pavel Roskin 2003-05-29 04:38:17 +00:00
parent d3f2f521dc
commit 5c39926570
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2003-05-29 Koblinger Egmont <egmont@uhulinux.hu>
* ext.c (regex_check_type): Recognize and skip "/dev/stdin:"
that can apprear in the output of new versions of file.
* util.c (unix_error_string): Convert error string from UTF-8 is
glib 2 is used.

View File

@ -437,6 +437,13 @@ regex_check_type (char *filename, int file_len, char *ptr, int *have_type)
for (content_shift = 15;
content_string[content_shift] == ' ';
content_shift++);
} else if (!islocal
&& !strncmp (content_string, "/dev/stdin:",
11)) {
/* Skip "/dev/stdin: " */
for (content_shift = 11;
content_string[content_shift] == ' ';
content_shift++);
}
} else {
/* No data */