summaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-04-19 11:24:33 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-04-22 02:47:38 +0200
commit621b3351798f5c78c5907bcfbc10217a63c4ae3f (patch)
treef480c9f3afb40b3b0a7ec2ad95dbd92302605f95 /src/io.c
parent371f20e6315715c9af3df3ef7dbbe8db46dd6347 (diff)
downloadcalcurse-621b3351798f5c78c5907bcfbc10217a63c4ae3f.zip
Return -1 in io_file_is_empty() if file cannot be accessed.
Ensure files don't appear as empty if fopen() fails (e.g. on temporary EACCES failures). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index bad6cf4..63e9d22 100644
--- a/src/io.c
+++ b/src/io.c
@@ -3085,5 +3085,5 @@ io_file_is_empty (char *file)
}
}
- return 1;
+ return -1;
}