aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-15 06:25:57 +0800
committerobscuren <geffobscura@gmail.com>2014-07-15 06:25:57 +0800
commit5ec62a51537dec6cd299dfc0ff1fbd0847338ff8 (patch)
tree27843db497bb7709abf1ecd0bdfe800c096dff3a
parent2784e256f1c5f8112486e9037c9b00e628e5aa10 (diff)
parent8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9 (diff)
downloaddexon-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar
dexon-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar.gz
dexon-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar.bz2
dexon-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar.lz
dexon-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar.xz
dexon-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar.zst
dexon-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.zip
Merge branch 'develop' of github.com-obscure:ethereum/eth-go into develop
-rw-r--r--ethutil/common.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/ethutil/common.go b/ethutil/common.go
index 6d88a1ed2..2fd031a20 100644
--- a/ethutil/common.go
+++ b/ethutil/common.go
@@ -3,8 +3,20 @@ package ethutil
import (
"fmt"
"math/big"
+ "runtime"
)
+func IsWindows() bool {
+ return runtime.GOOS == "windows"
+}
+
+func WindonizePath(path string) string {
+ if string(path[0]) == "/" && IsWindows() {
+ path = path[1:]
+ }
+ return path
+}
+
// The different number of units
var (
Douglas = BigPow(10, 42)