aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/nnn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 869d5b7..6bdfd20 100644
--- 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);