summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-07-08 14:54:40 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-07-08 14:54:40 +0000
commitcfffedfa8b3799b930f167ff46b94354646b50ce (patch)
tree965bd8be16f3d61b737a84db2ce956e4c9965dde
parent50304a3ace02907c6c49aa0dce0a59584ea02c4f (diff)
downloadrockbox-cfffedfa8b3799b930f167ff46b94354646b50ce.tar.gz
rockbox-cfffedfa8b3799b930f167ff46b94354646b50ce.zip
Lua IOlib: don't create files when they don't exist
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21715 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/lua/liolib.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/apps/plugins/lua/liolib.c b/apps/plugins/lua/liolib.c
index 76c758e363..0651ca971e 100644
--- a/apps/plugins/lua/liolib.c
+++ b/apps/plugins/lua/liolib.c
@@ -156,8 +156,6 @@ static int io_open (lua_State *L) {
156 flags = O_WRONLY | O_APPEND; break; 156 flags = O_WRONLY | O_APPEND; break;
157 } 157 }
158 } 158 }
159 if(!rb->file_exists(filename))
160 flags |= O_CREAT;
161 *pf = rb->open(filename, flags); 159 *pf = rb->open(filename, flags);
162 return (*pf < 0) ? pushresult(L, 0, filename) : 1; 160 return (*pf < 0) ? pushresult(L, 0, filename) : 1;
163} 161}