This commit is contained in:
Liang Ding 2014-11-16 17:09:57 +08:00
parent 625cca8f61
commit f83ec4faaa
1 changed files with 4 additions and 1 deletions

View File

@ -83,7 +83,10 @@ func GetFiles(w http.ResponseWriter, r *http.Request) {
}
// construct Go API node
apiPath := runtime.GOROOT() + conf.PathSeparator + "src" + conf.PathSeparator + "pkg"
apiPath := runtime.GOROOT() + conf.PathSeparator + "src" + conf.PathSeparator + "pkg" // before Go 1.4
if !util.File.IsExist(apiPath) {
apiPath = runtime.GOROOT() + conf.PathSeparator + "src" // Go 1.4 and after
}
apiNode := FileNode{Name: "Go API", Path: apiPath, IconSkin: "ico-ztree-dir-api ", Type: "d",
Creatable: false, Removable: false, FileNodes: []*FileNode{}}