mirror of
https://github.com/jarun/nnn.git
synced 2025-03-24 23:32:21 +00:00
Merge pull request #281 from sjmulder/pr/fwrite
Don't ignore fwrite errors
This commit is contained in:
commit
f0b00c9fbf
1 changed files with 2 additions and 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);
|
||||
|
|
Loading…
Add table
Reference in a new issue