Skip to content

Commit

Permalink
Check if the filename is already an absolute path, and return that if so
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender committed Dec 21, 2023
1 parent 8a6d1af commit 1b28710
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ func GetChiaRootPath() (string, error) {

// GetFullPath returns the full path to a particular filename within CHIA_ROOT
func (c *ChiaConfig) GetFullPath(filename string) string {
if filepath.IsAbs(filename) {
return filename
}
return filepath.Join(c.ChiaRoot, filename)
}

Expand Down

0 comments on commit 1b28710

Please sign in to comment.