Cleaned up some of that util
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/user"
|
||||
"path"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@ -58,3 +59,10 @@ func WriteFile(filePath string, content []byte) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func AbsolutePath(Datadir string, filename string) string {
|
||||
if path.IsAbs(filename) {
|
||||
return filename
|
||||
}
|
||||
return path.Join(Datadir, filename)
|
||||
}
|
||||
|
Reference in New Issue
Block a user