From d2735955d98c6d9317711c0d789b2d6a35294639 Mon Sep 17 00:00:00 2001 From: nkbai Date: Fri, 1 Sep 2017 16:37:26 +0800 Subject: [PATCH] accounts/abi: on windows,empty filename always generate error: "Failed to generate ABI binding: The filename, directory name, or volume label syntax is incorrect." because package imports need to get filename's path. --- accounts/abi/bind/bind.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/abi/bind/bind.go b/accounts/abi/bind/bind.go index 73e95e02a1..f587580884 100644 --- a/accounts/abi/bind/bind.go +++ b/accounts/abi/bind/bind.go @@ -122,7 +122,7 @@ func Bind(types []string, abis []string, bytecodes []string, pkg string, lang La } // For Go bindings pass the code through goimports to clean it up and double check if lang == LangGo { - code, err := imports.Process("", buffer.Bytes(), nil) + code, err := imports.Process(".", buffer.Bytes(), nil) if err != nil { return "", fmt.Errorf("%v\n%s", err, buffer) }