Skip to content

Commit

Permalink
Merge pull request #99 from Chia-Network/abspath
Browse files Browse the repository at this point in the history
Check if the filename is already an absolute path, and return that if so
  • Loading branch information
cmmarslender authored Dec 21, 2023
2 parents 8a6d1af + 1b28710 commit bfa696f
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 bfa696f

Please sign in to comment.