ax(node): replace path with filepath for filesystem path joining
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:
parent
670401c750
commit
0e5956f57d
1 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue