X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/2530ab22f56855b2f137c65cf454311fc9824c77..b3906a21b28a505d1a672b159dbc94ecb3be26be:/Cytore.hpp diff --git a/Cytore.hpp b/Cytore.hpp index cb6c4241..168f2ef5 100644 --- a/Cytore.hpp +++ b/Cytore.hpp @@ -142,8 +142,11 @@ class File { bool Truncate_(size_t capacity) { capacity = Round(capacity, Block_); + int error(ftruncate(file_, capacity)); - _assert(error == 0); + if (error != 0) + return false; + Map_(capacity); return true; }