summaryrefslogtreecommitdiff
path: root/Cytore.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Cytore.hpp')
-rw-r--r--Cytore.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Cytore.hpp b/Cytore.hpp
index cb6c424..168f2ef 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;
}