diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-04 21:39:15 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-04 21:39:15 +0800 |
commit | 987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9 (patch) | |
tree | 32ff13edca8c3d9b61b303f7d314291d0f216574 /ethutil/path.go | |
parent | 1b905675465d96227f1a8144fe592e76f646f559 (diff) | |
parent | 08b03afa4bb3a40d2faf6543bc884a8ece5be2a1 (diff) | |
download | dexon-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar dexon-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar.gz dexon-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar.bz2 dexon-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar.lz dexon-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar.xz dexon-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar.zst dexon-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.zip |
Merge branch 'poc8' into docbranch
Diffstat (limited to 'ethutil/path.go')
-rw-r--r-- | ethutil/path.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ethutil/path.go b/ethutil/path.go index cfbc38950..f64e3849e 100644 --- a/ethutil/path.go +++ b/ethutil/path.go @@ -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) +} |