diff options
Diffstat (limited to 'ethutil')
-rw-r--r-- | ethutil/path.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ethutil/path.go b/ethutil/path.go index 27022bcfa..cfbc38950 100644 --- a/ethutil/path.go +++ b/ethutil/path.go @@ -45,7 +45,7 @@ func ReadAllFile(filePath string) (string, error) { } func WriteFile(filePath string, content []byte) error { - fh, err := os.OpenFile(filePath, os.O_RDWR|os.O_CREATE, os.ModePerm) + fh, err := os.OpenFile(filePath, os.O_TRUNC|os.O_RDWR|os.O_CREATE, os.ModePerm) if err != nil { return err } |