aboutsummaryrefslogtreecommitdiff
path: root/loslib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-10-19 12:54:02 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-10-19 12:54:02 -0300
commitbc84180d12f315f0e036edabc1457c29cb51ee21 (patch)
tree4f65b44ff47b4bb662bb725144d31f01ec727fe0 /loslib.c
parentad5da6ba1456b5d4d1abbd52d4e04dc78fb41c45 (diff)
downloadlua-bc84180d12f315f0e036edabc1457c29cb51ee21.tar.gz
lua-bc84180d12f315f0e036edabc1457c29cb51ee21.tar.bz2
lua-bc84180d12f315f0e036edabc1457c29cb51ee21.zip
error message in 'os.rename' does not include file name, because error
may be caused both by 'fromname' or 'toname'
Diffstat (limited to 'loslib.c')
-rw-r--r--loslib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/loslib.c b/loslib.c
index 722c1e39..39430419 100644
--- a/loslib.c
+++ b/loslib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loslib.c,v 1.38 2011/11/30 12:35:05 roberto Exp roberto $ 2** $Id: loslib.c,v 1.39 2012/05/23 15:37:09 roberto Exp roberto $
3** Standard Operating System library 3** Standard Operating System library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -98,7 +98,7 @@ static int os_remove (lua_State *L) {
98static int os_rename (lua_State *L) { 98static int os_rename (lua_State *L) {
99 const char *fromname = luaL_checkstring(L, 1); 99 const char *fromname = luaL_checkstring(L, 1);
100 const char *toname = luaL_checkstring(L, 2); 100 const char *toname = luaL_checkstring(L, 2);
101 return luaL_fileresult(L, rename(fromname, toname) == 0, fromname); 101 return luaL_fileresult(L, rename(fromname, toname) == 0, NULL);
102} 102}
103 103
104 104