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 | |
| parent | 3fa16843019b65016e125d74f38d34ac5e665f6b (diff) | |
| download | rockbox-8898339fcf07aee644ebcabe77d5a2dd323642ed.zip rockbox-8898339fcf07aee644ebcabe77d5a2dd323642ed.tar.gz rockbox-8898339fcf07aee644ebcabe77d5a2dd323642ed.tar.bz2 rockbox-8898339fcf07aee644ebcabe77d5a2dd323642ed.tar.xz | |
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')
| -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 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; } |