aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--text.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/text.c b/text.c
index 92e961c..1e1c968 100644
--- a/text.c
+++ b/text.c
@@ -988,6 +988,8 @@ bool text_save_range(Text *txt, Filerange *range, const char *filename) {
if (fsync(fd) == -1)
goto err;
+ if (fstat(fd, &meta) == -1)
+ goto err;
if (close(fd) == -1)
return false;
txt->info = meta;