nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f0b00c9fbf4f8a550af039c0389abdba133baae5
parent 331d2a6cc5e275f85df345adc4f22ced5c717bd0
Author: Mischievous Meerkat <engineerarun@gmail.com>
Date:   Thu, 13 Jun 2019 05:20:54 +0530

Merge pull request #281 from sjmulder/pr/fwrite

Don't ignore fwrite errors
Diffstat:
Msrc/nnn.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -745,9 +745,9 @@ static void writecp(const char *buf, const size_t buflen) return; FILE *fp = fopen(g_cppath, "w"); - if (fp) { - fwrite(buf, 1, buflen, fp); + if (fwrite(buf, 1, buflen, fp) != buflen) + printwarn(NULL); fclose(fp); } else printwarn(NULL);