aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2015-08-25 18:26:52 +0000
committerMike Buland <eichlan@xagasoft.com>2015-08-25 18:26:52 +0000
commit464c9493f30847096c874ee9618ba420239c915a (patch)
tree1dc36d16fd8c748f3755303077f9e15cffb54e10
parented5fa193d770a790d5b7aa3a9e7e4d6cc46292d3 (diff)
downloadbuild-464c9493f30847096c874ee9618ba420239c915a.tar.gz
build-464c9493f30847096c874ee9618ba420239c915a.tar.bz2
build-464c9493f30847096c874ee9618ba420239c915a.tar.xz
build-464c9493f30847096c874ee9618ba420239c915a.zip
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.
Diffstat (limited to '')
-rw-r--r--src/functionopen.cpp2
1 files changed, 1 insertions, 1 deletions
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 )
36 Bu::String sMode = lParams.last().toString().toLower(); 36 Bu::String sMode = lParams.last().toString().toLower();
37 int iMode = Bu::File::Create; 37 int iMode = Bu::File::Create;
38 if( sMode.find('w') ) 38 if( sMode.find('w') )
39 iMode |= Bu::File::Write; 39 iMode |= Bu::File::Write|Bu::File::Truncate;
40 if( sMode.find('r') ) 40 if( sMode.find('r') )
41 iMode |= Bu::File::Read; 41 iMode |= Bu::File::Read;
42 Variable vRet( 42 Variable vRet(