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:
parent
6df2566acb
commit
fb998ce2df
1 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue