From 7a6e17cff79a3a007a2519bdb676f1be8e937624 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 29 Jan 2017 07:32:55 -0800 Subject: If Cytore fails to allocate an empty file, unlink. --- Cytore.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cytore.hpp b/Cytore.hpp index 714da26..a382dd8 100644 --- a/Cytore.hpp +++ b/Cytore.hpp @@ -190,7 +190,11 @@ class File { size_t size(stat.st_size); if (size == 0) { - _assert(Truncate_(core)); + if (!Truncate_(core)) { + unlink(path); + _assert(false); + } + Header_().magic_ = Magic; Size_() = core; } else { -- cgit v1.2.3