Skip to content

Commit

Permalink
Merge pull request #1373 from BishopFox/fix/windows-assets-filepath
Browse files Browse the repository at this point in the history
Use path.Join for embedded fs instead of filepath.Join
  • Loading branch information
moloch-- authored Aug 4, 2023
2 parents ce81ce5 + 270e9f2 commit 150b62a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/assets/assets-helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func setupGo(appDir string) error {
os.MkdirAll(goRootPath, 0700)

// Go compiler and stdlib
goZipFSPath := filepath.Join("fs", runtime.GOOS, runtime.GOARCH, "go.zip")
goZipFSPath := path.Join("fs", runtime.GOOS, runtime.GOARCH, "go.zip")
goZip, err := assetsFs.ReadFile(goZipFSPath)
if err != nil {
setupLog.Errorf("static asset not found: %s", goZipFSPath)
Expand Down Expand Up @@ -176,7 +176,7 @@ func setupGo(appDir string) error {
if runtime.GOOS == "windows" {
garbleFileName = "garble.exe"
}
garbleAssetPath := filepath.Join("fs", runtime.GOOS, runtime.GOARCH, garbleFileName)
garbleAssetPath := path.Join("fs", runtime.GOOS, runtime.GOARCH, garbleFileName)
garbleFile, err := assetsFs.ReadFile(garbleAssetPath)
if err != nil {
setupLog.Errorf("Static asset not found: %s", garbleFile)
Expand All @@ -194,7 +194,7 @@ func setupGo(appDir string) error {

func setupSGN(appDir string) error {
goBinPath := filepath.Join(appDir, "go", "bin")
sgnZipFSPath := filepath.Join("fs", runtime.GOOS, runtime.GOARCH, "sgn.zip")
sgnZipFSPath := path.Join("fs", runtime.GOOS, runtime.GOARCH, "sgn.zip")
sgnZip, err := assetsFs.ReadFile(sgnZipFSPath)
if err != nil {
setupLog.Errorf("static asset not found: %s", sgnZipFSPath)
Expand Down

0 comments on commit 150b62a

Please sign in to comment.