summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/lua/liolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/lua/liolib.c b/apps/plugins/lua/liolib.c
index 08aed42..eea40c0 100644
--- a/apps/plugins/lua/liolib.c
+++ b/apps/plugins/lua/liolib.c
@@ -151,7 +151,7 @@ static int io_open (lua_State *L) {
case 'r':
flags = O_RDONLY; break;
case 'w':
- flags = O_WRONLY; break;
+ flags = O_WRONLY | O_TRUNC; break;
case 'a':
flags = O_WRONLY | O_APPEND; break;
}