mirror of https://github.com/rusefi/lua.git
error message in 'os.rename' does not include file name, because error
may be caused both by 'fromname' or 'toname'
This commit is contained in:
parent
ad5da6ba14
commit
bc84180d12
4
loslib.c
4
loslib.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: loslib.c,v 1.38 2011/11/30 12:35:05 roberto Exp roberto $
|
** $Id: loslib.c,v 1.39 2012/05/23 15:37:09 roberto Exp roberto $
|
||||||
** Standard Operating System library
|
** Standard Operating System library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -98,7 +98,7 @@ static int os_remove (lua_State *L) {
|
||||||
static int os_rename (lua_State *L) {
|
static int os_rename (lua_State *L) {
|
||||||
const char *fromname = luaL_checkstring(L, 1);
|
const char *fromname = luaL_checkstring(L, 1);
|
||||||
const char *toname = luaL_checkstring(L, 2);
|
const char *toname = luaL_checkstring(L, 2);
|
||||||
return luaL_fileresult(L, rename(fromname, toname) == 0, fromname);
|
return luaL_fileresult(L, rename(fromname, toname) == 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue