diff options
author | Kjartan Maraas <kmaraas@gnome.org> | 2003-05-01 11:55:23 +0000 |
---|---|---|
committer | Kjartan Maraas <kmaraas@src.gnome.org> | 2003-05-01 11:55:23 +0000 |
commit | ac323699ae10d9ddd8a7d11c98965738e492f27d (patch) | |
tree | c4e6a8e1e922bba5605461f3e9cac864a6d89ce8 /src/man2html/yelp-man2html.c | |
parent | f5cead9436dd042e20cce777059b03de119a35f4 (diff) | |
download | yelp-ac323699ae10d9ddd8a7d11c98965738e492f27d.tar.gz |
Two patches from John Fleck to fix crashes when feeding directories to the
2003-05-01 Kjartan Maraas <kmaraas@gnome.org>
* help-converters/info/main.c: (file_exists):
* help-converters/man/gnome-man2html.c: (main):
Two patches from John Fleck to fix crashes when
feeding directories to the help converters. Fixes
bug #104056.
Diffstat (limited to 'src/man2html/yelp-man2html.c')
-rw-r--r-- | src/man2html/yelp-man2html.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/man2html/yelp-man2html.c b/src/man2html/yelp-man2html.c index c021fa78..1e2b6162 100644 --- a/src/man2html/yelp-man2html.c +++ b/src/man2html/yelp-man2html.c @@ -3762,6 +3762,16 @@ main(int argc, char **argv) infile = argv[i]; } + if (g_file_test(infile, G_FILE_TEST_IS_DIR)) { + printf("<HTML><HEAD><TITLE>Document not found</TITLE>\n" + "</HEAD><BODY>" + "I don't know how to open the document \"%s\" " + "on your system.\n" + "</BODY></HTML>\n", infile); + + return 4; + } + if(!infile || !strcmp(infile, "-")) infh = gzdopen(0, "r"); else |