diff --git a/internal/runner/runner.go b/internal/runner/runner.go index 5594ef4..e073ce3 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -8,6 +8,7 @@ import ( "fmt" "os" "os/exec" + "path" "path/filepath" "strings" "time" @@ -277,7 +278,8 @@ func ExtractScripts(fs interface{ ReadDir(string) ([]os.DirEntry, error); ReadFi if e.IsDir() { continue } - data, err := fs.ReadFile(filepath.Join("scripts", e.Name())) + // embed.FS always uses forward slashes regardless of OS + data, err := fs.ReadFile(path.Join("scripts", e.Name())) if err != nil { return err } @@ -298,13 +300,14 @@ func extractDir(fs interface{ ReadDir(string) ([]os.DirEntry, error); ReadFile(s if err != nil { return err } - dst := filepath.Join(dstBase, src) + dst := filepath.Join(dstBase, filepath.FromSlash(src)) if err := os.MkdirAll(dst, 0755); err != nil { return err } for _, e := range entries { - srcPath := filepath.Join(src, e.Name()) - dstPath := filepath.Join(dstBase, srcPath) + // embed.FS always uses forward slashes regardless of OS + srcPath := path.Join(src, e.Name()) + dstPath := filepath.Join(dstBase, filepath.FromSlash(srcPath)) if e.IsDir() { if err := extractDir(fs, srcPath, dstBase); err != nil { return err diff --git a/xetup.exe b/xetup.exe index 42b2275..06a2d64 100755 Binary files a/xetup.exe and b/xetup.exe differ