Fixing some huge bugs, and implemented remove function

This commit is contained in:
2025-09-28 16:45:51 -03:00
parent 2c322d4de8
commit b4f55ad36f
4 changed files with 47 additions and 51 deletions

View File

@@ -20,10 +20,10 @@ func GetSandBox(sandboxdir string) (lua.LState, error) {
L.SetGlobal("package", lua.LNil)
L.SetGlobal("require", lua.LNil)
L.SetGlobal("runningUnsafe", lua.LFalse)
L.SetGlobal("SAFE_MODE", lua.LTrue)
L.SetGlobal("packets_package_dir", lua.LString(cfg.Config.Data_d))
L.SetGlobal("packets_bin_dir", lua.LString(cfg.Config.Bin_d))
L.SetGlobal("PACKETS_DATADIR", lua.LString(cfg.Config.Data_d))
L.SetGlobal("PACKETS_BIN_DIR", lua.LString(cfg.Config.Bin_d))
L.SetGlobal("path_join", L.NewFunction(Ljoin))

View File

@@ -257,7 +257,7 @@ func CheckIfPackageInstalled(name string) (bool, error) {
}
func GetDependencies(name string) ([]string, error) {
db, err := sql.Open("sqlite", consts.InstalledDB)
db, err := sql.Open("sqlite", consts.IndexDB)
if err != nil {
return []string{}, err
}