code maybe confusing, but now using Packet.lua format
This commit is contained in:
@@ -16,13 +16,10 @@ func GetSandBox() (lua.LState, error) {
|
||||
osObject := L.GetGlobal("os").(*lua.LTable)
|
||||
L.SetGlobal("SAFE_MODE", lua.LTrue)
|
||||
|
||||
L.SetGlobal("PACKETS_DATADIR", lua.LString(cfg.Config.Data_d))
|
||||
L.SetGlobal("packets_bin_dir", lua.LString(cfg.Config.Bin_d))
|
||||
L.SetGlobal("BIN_DIR", lua.LString(cfg.Config.Bin_d))
|
||||
|
||||
L.SetGlobal("path_join", L.NewFunction(Ljoin))
|
||||
|
||||
// Packets build functions
|
||||
|
||||
osObject.RawSetString("remove", L.NewFunction(LSafeRemove))
|
||||
osObject.RawSetString("rename", L.NewFunction(LSafeRename))
|
||||
osObject.RawSetString("copy", L.NewFunction(LSafeCopy))
|
||||
|
||||
Reference in New Issue
Block a user