mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-24 03:47:45 +08:00
fix path miss in windows/add a new api create function (#23)
* fix path was not always correct in windows * add new api create function for if the port was different with api file. * Update api.go remove no need commit This commit was moved from ipfs/go-ipfs-http-client@8c87debb12
This commit is contained in:
parent
9345cfa7b8
commit
be8f80237d
@ -7,12 +7,12 @@ import (
|
||||
"net/http"
|
||||
gohttp "net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
iface "github.com/ipfs/interface-go-ipfs-core"
|
||||
caopts "github.com/ipfs/interface-go-ipfs-core/options"
|
||||
homedir "github.com/mitchellh/go-homedir"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
manet "github.com/multiformats/go-multiaddr-net"
|
||||
)
|
||||
@ -73,7 +73,7 @@ func ApiAddr(ipfspath string) (ma.Multiaddr, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
apiFile := path.Join(baseDir, DefaultApiFile)
|
||||
apiFile := filepath.Join(baseDir, DefaultApiFile)
|
||||
|
||||
api, err := ioutil.ReadFile(apiFile)
|
||||
if err != nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user