From: Jay Freeman (saurik) Date: Sun, 29 Jan 2017 15:32:55 +0000 (-0800) Subject: If Cytore fails to allocate an empty file, unlink. X-Git-Tag: v1.1.28%b7~3 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/7a6e17cff79a3a007a2519bdb676f1be8e937624?ds=sidebyside If Cytore fails to allocate an empty file, unlink. --- diff --git a/Cytore.hpp b/Cytore.hpp index 714da266..a382dd87 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 {