diff options
Diffstat (limited to 'lib-src/ebrowse.c')
| -rw-r--r-- | lib-src/ebrowse.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 94fa9114d23..398dd10896e 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c | |||
| @@ -3909,17 +3909,31 @@ main (argc, argv) | |||
| 3909 | 3909 | ||
| 3910 | fp = fopen (out_filename, "r"); | 3910 | fp = fopen (out_filename, "r"); |
| 3911 | if (fp == NULL) | 3911 | if (fp == NULL) |
| 3912 | yyerror ("file `%s' must exist for --append", out_filename); | 3912 | { |
| 3913 | yyerror ("file `%s' must exist for --append", out_filename); | ||
| 3914 | exit (EXIT_FAILURE); | ||
| 3915 | } | ||
| 3913 | 3916 | ||
| 3914 | rc = fseek (fp, 0, SEEK_END); | 3917 | rc = fseek (fp, 0, SEEK_END); |
| 3915 | if (rc == -1) | 3918 | if (rc == -1) |
| 3916 | yyerror ("error seeking in file `%s'", out_filename); | 3919 | { |
| 3920 | yyerror ("error seeking in file `%s'", out_filename); | ||
| 3921 | exit (EXIT_FAILURE); | ||
| 3922 | } | ||
| 3917 | 3923 | ||
| 3918 | rc = ftell (fp); | 3924 | rc = ftell (fp); |
| 3919 | if (rc == -1) | 3925 | if (rc == -1) |
| 3920 | yyerror ("error getting size of file `%s'", out_filename); | 3926 | { |
| 3927 | yyerror ("error getting size of file `%s'", out_filename); | ||
| 3928 | exit (EXIT_FAILURE); | ||
| 3929 | } | ||
| 3930 | |||
| 3921 | else if (rc == 0) | 3931 | else if (rc == 0) |
| 3922 | yyerror ("file `%s' is empty", out_filename); | 3932 | { |
| 3933 | yyerror ("file `%s' is empty", out_filename); | ||
| 3934 | /* It may be ok to use an empty file for appending. | ||
| 3935 | exit (EXIT_FAILURE); */ | ||
| 3936 | } | ||
| 3923 | 3937 | ||
| 3924 | fclose (fp); | 3938 | fclose (fp); |
| 3925 | } | 3939 | } |