diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-09-06 21:41:48 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-09-06 21:41:48 +0000 |
commit | 8898339fcf07aee644ebcabe77d5a2dd323642ed (patch) | |
tree | a8716e01adf88b27431849c406ceeac03bade0c9 /apps/plugins/lua | |
parent | 3fa16843019b65016e125d74f38d34ac5e665f6b (diff) | |
download | rockbox-8898339fcf07aee644ebcabe77d5a2dd323642ed.tar.gz rockbox-8898339fcf07aee644ebcabe77d5a2dd323642ed.zip |
Lua plugin: fix bad behaviour for io.open(path, 'w')
Author: Christophe Gragnic
Patch: FS#10592
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22645 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lua')
-rw-r--r-- | apps/plugins/lua/liolib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/lua/liolib.c b/apps/plugins/lua/liolib.c index 08aed42388..eea40c0d02 100644 --- a/apps/plugins/lua/liolib.c +++ b/apps/plugins/lua/liolib.c | |||
@@ -151,7 +151,7 @@ static int io_open (lua_State *L) { | |||
151 | case 'r': | 151 | case 'r': |
152 | flags = O_RDONLY; break; | 152 | flags = O_RDONLY; break; |
153 | case 'w': | 153 | case 'w': |
154 | flags = O_WRONLY; break; | 154 | flags = O_WRONLY | O_TRUNC; break; |
155 | case 'a': | 155 | case 'a': |
156 | flags = O_WRONLY | O_APPEND; break; | 156 | flags = O_WRONLY | O_APPEND; break; |
157 | } | 157 | } |