Skip to content

Commit

Permalink
add support for symbolically linked readline config files
Browse files Browse the repository at this point in the history
* fixes mridgers#461

* ref/see also: <mridgers#342>
  • Loading branch information
rivy authored and Stanzilla committed Aug 14, 2017
1 parent d3a8d73 commit 5ebc4a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readline/readline/bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ _rl_read_file (filename, sizep)
char *buffer;
int i, file;

if ((stat (filename, &finfo) < 0) || (file = open (filename, O_RDONLY, 0666)) < 0)
if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0))
return ((char *)NULL);

file_size = (size_t)finfo.st_size;
Expand Down

0 comments on commit 5ebc4a6

Please sign in to comment.