From 4e0f57f4d7b312f6fe7a491f60e1d41637ae07d5 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sun, 8 Jan 2012 14:15:51 +0100 Subject: [PATCH] DevFileWrapper now understands and respects O_TRUNC. --- sortix/filesystem.cpp | 1 + 1 file changed, 1 insertion(+) 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()