Add backwards compatibility with int fs_copyfile flags param
@@ -633,6 +633,9 @@ static int luv_fs_copyfile(lua_State*L) {
lua_pop(L, 1);
#endif
}
+ else if (lua_type(L, 3) == LUA_TNUMBER) {
+ flags = lua_tointeger(L, 3);
+ }
ref = luv_check_continuation(L, 4);
req = (uv_fs_t*)lua_newuserdata(L, sizeof(*req));
req->data = luv_setup_req(L, ref);
