ax(node): replace banned path/filepath with path in worker.go

worker.go imported path/filepath (banned import) solely for two
filepath.Join calls building the miner install directory path.
Replaced with path.Join from the stdlib path package which is
not banned and behaves identically on Linux for absolute paths.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 14:03:13 +01:00
parent 6df2566acb
commit fb998ce2df
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -4,7 +4,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"path/filepath"
"path"
"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 := filepath.Join(xdg.DataHome, "lethean-desktop", "miners")
installDir := filepath.Join(minersDir, payload.Name)
minersDir := path.Join(xdg.DataHome, "lethean-desktop", "miners")
installDir := path.Join(minersDir, payload.Name)
logging.Info("deploying miner bundle", logging.Fields{
"name": payload.Name,