Looks like no one ever tried this? fopen was returning EINVAL because fgets was leaving a trailing newline at the end of the filename. (Which is what fgets is documented to do.)
Looks like no one ever tried this? fopen was returning EINVAL because fgets was leaving a trailing newline at the end of the filename. (Which is what fgets is documented to do.)