Skip to content

Commit

Permalink
According to recent spec discussion, we only display an error on
Browse files Browse the repository at this point in the history
missing files for write/append mode. In read mode, we return silently.

#4
  • Loading branch information
Andrew Plotkin authored and Andrew Plotkin committed Aug 7, 2020
1 parent 498eee9 commit 3846c87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cgstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ strid_t glk_stream_open_file(fileref_t *fref, glui32 fmode,

fl = fopen(fref->filename, modestr);
if (!fl) {
gli_strict_warning("stream_open_file: unable to open file.");
/* According to recent spec discussion, we only display an error on missing files for write/append mode. In read mode, we return silently. */
if (fmode != filemode_Read) {
gli_strict_warning("stream_open_file: unable to open file.");
}
return NULL;
}

Expand Down

0 comments on commit 3846c87

Please sign in to comment.