From 464c9493f30847096c874ee9618ba420239c915a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 25 Aug 2015 18:26:52 +0000 Subject: The open function now truncates the file like fopen. I would like for it to mimic fopen more completely. I think it's about time to give it a lot more attention, actually. --- src/functionopen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functionopen.cpp b/src/functionopen.cpp index 4e8f636..b70a6c2 100644 --- a/src/functionopen.cpp +++ b/src/functionopen.cpp @@ -36,7 +36,7 @@ Variable FunctionOpen::call( Variable &input, VarList lParams ) Bu::String sMode = lParams.last().toString().toLower(); int iMode = Bu::File::Create; if( sMode.find('w') ) - iMode |= Bu::File::Write; + iMode |= Bu::File::Write|Bu::File::Truncate; if( sMode.find('r') ) iMode |= Bu::File::Read; Variable vRet( -- cgit v1.2.3