my method of extracting archives does not preserve permission
this has be fixed with a workaround by using chmod to make factorio
executable
This commit is contained in:
2026-05-04 13:11:29 -06:00
parent 9e7bd21602
commit 3d24198ad3
2 changed files with 7 additions and 0 deletions

View File

@@ -6,12 +6,14 @@ import (
"log"
"net/http"
"os"
"os/exec"
"path/filepath"
"github.com/therootcompany/xz"
)
func downloadHeadless() {
var c = readCfg("config.yml")
headlessQuery := "https://www.factorio.com/get-download/latest/headless/linux64"
url := headlessQuery
@@ -42,4 +44,6 @@ func downloadHeadless() {
outFile.Close()
}
}
// zip does not preserve permissions correctly so i have to do this
exec.Command("chmod", "+x", c.Server.ServExec)
}