mirror of
https://github.com/jarun/nnn.git
synced 2025-01-09 17:39:38 +00:00
Merge pull request #281 from sjmulder/pr/fwrite
Don't ignore fwrite errors
This commit is contained in:
commit
f0b00c9fbf
|
@ -745,9 +745,9 @@ static void writecp(const char *buf, const size_t buflen)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FILE *fp = fopen(g_cppath, "w");
|
FILE *fp = fopen(g_cppath, "w");
|
||||||
|
|
||||||
if (fp) {
|
if (fp) {
|
||||||
fwrite(buf, 1, buflen, fp);
|
if (fwrite(buf, 1, buflen, fp) != buflen)
|
||||||
|
printwarn(NULL);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
} else
|
} else
|
||||||
printwarn(NULL);
|
printwarn(NULL);
|
||||||
|
|
Loading…
Reference in a new issue