aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
Diffstat (limited to 'ethutil')
-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)