docserver: uses filepath.Abs

This commit is contained in:
zelig 2015-05-29 11:44:31 +01:00
parent 49d4399711
commit 7c05778cca

View file

@ -4,8 +4,8 @@ import (
"fmt"
"io/ioutil"
"net/http"
"path/filepath"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
)
@ -72,7 +72,9 @@ func (self *DocServer) Get(uri, path string) (content []byte, err error) {
}
if path != "" {
ioutil.WriteFile(utils.ExpandPath(path), content, 0700)
var abspath string
abspath, err = filepath.Abs(path)
ioutil.WriteFile(abspath, content, 0700)
}
return