diff --git a/sortix/filesystem.cpp b/sortix/filesystem.cpp index 2cd600f8..1b8fa4f5 100644 --- a/sortix/filesystem.cpp +++ b/sortix/filesystem.cpp @@ -96,6 +96,7 @@ namespace Sortix this->flags = flags; this->offset = 0; this->buffer->Refer(); + if ( flags & O_TRUNC ) { buffer->Resize(0); } } DevFileWrapper::~DevFileWrapper()