ax(node): replace path with filepath for filesystem path joining
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

The "path" package uses forward-slash separators and is intended for
URL paths; filesystem paths require "path/filepath" for OS-correct
behaviour. Fixes worker.go handleDeploy to use filepath.Join when
constructing the miners installation directory.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 16:53:35 +01:00
parent 670401c750
commit 0e5956f57d
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -2,7 +2,7 @@ package node
import (
"encoding/base64"
"path"
"path/filepath"
"time"
"forge.lthn.ai/Snider/Mining/pkg/logging"
@ -361,8 +361,8 @@ func (worker *Worker) handleDeploy(conn *PeerConnection, msg *Message) (*Message
case BundleMiner, BundleFull:
// Determine installation directory
// We use xdg.DataHome/lethean-desktop/miners/<bundle_name>
minersDir := path.Join(xdg.DataHome, "lethean-desktop", "miners")
installDir := path.Join(minersDir, payload.Name)
minersDir := filepath.Join(xdg.DataHome, "lethean-desktop", "miners")
installDir := filepath.Join(minersDir, payload.Name)
logging.Info("deploying miner bundle", logging.Fields{
"name": payload.Name,