diff options
author | 2019-06-13 05:20:54 +0530 | |
---|---|---|
committer | 2019-06-13 05:20:54 +0530 | |
commit | f0b00c9fbf4f8a550af039c0389abdba133baae5 (patch) | |
tree | bfdf81d37986d53ef78024c38223d84e339460c0 /src | |
parent | 331d2a6cc5e275f85df345adc4f22ced5c717bd0 (diff) | |
parent | da60f55559f5e83753a39d0b4a7e88c5c26aef32 (diff) | |
download | nnn-f0b00c9fbf4f8a550af039c0389abdba133baae5.tar.gz |
Merge pull request #281 from sjmulder/pr/fwrite
Don't ignore fwrite errors
Diffstat (limited to 'src')
-rw-r--r-- | src/nnn.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |