Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d44fa7b

Browse files
committedOct 21, 2015
fix path creation so it works on windows
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
1 parent 983f4ab commit d44fa7b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed
 

‎assets/assets.go

+9-8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package assets
66
import (
77
"bytes"
88
"fmt"
9+
"path"
910
"path/filepath"
1011

1112
"github.com/ipfs/go-ipfs/blocks/key"
@@ -16,12 +17,12 @@ import (
1617

1718
// initDocPaths lists the paths for the docs we want to seed during --init
1819
var initDocPaths = []string{
19-
"init-doc/about",
20-
"init-doc/readme",
21-
"init-doc/help",
22-
"init-doc/contact",
23-
"init-doc/security-notes",
24-
"init-doc/quick-start",
20+
path.Join("init-doc", "about"),
21+
path.Join("init-doc", "readme"),
22+
path.Join("init-doc", "help"),
23+
path.Join("init-doc", "contact"),
24+
path.Join("init-doc", "security-notes"),
25+
path.Join("init-doc", "quick-start"),
2526
}
2627

2728
// SeedInitDocs adds the list of embedded init documentation to the passed node, pins it and returns the root key
@@ -30,8 +31,8 @@ func SeedInitDocs(nd *core.IpfsNode) (*key.Key, error) {
3031
}
3132

3233
var initDirIndex = []string{
33-
"../vendor/dir-index-html-v1.0.0/knownIcons.txt",
34-
"../vendor/dir-index-html-v1.0.0/dir-index.html",
34+
path.Join("..", "vendor", "dir-index-html-v1.0.0", "knownIcons.txt"),
35+
path.Join("..", "vendor", "dir-index-html-v1.0.0", "dir-index.html"),
3536
}
3637

3738
func SeedInitDirIndex(nd *core.IpfsNode) (*key.Key, error) {

0 commit comments

Comments
 (0)
Please sign in to comment.