Browse Source

little fix

pull/103/head
Unknown 12 years ago
parent
commit
b31b0dfa69
  1. 10
      doc/github.go
  2. 4
      gpm.go

10
doc/github.go

@ -106,7 +106,10 @@ func GetGithubDoc(client *http.Client, match map[string]string, commit string, i
// Check if it is directory or not. // Check if it is directory or not.
if strings.HasSuffix(absPath, "/") { if strings.HasSuffix(absPath, "/") {
// Directory. // Directory.
dirs = append(dirs, absPath) // Check if current directory is example.
if !(!isDownloadEx && strings.Contains(absPath, "example")) {
dirs = append(dirs, absPath)
}
continue continue
} }
@ -143,11 +146,6 @@ func GetGithubDoc(client *http.Client, match map[string]string, commit string, i
// Check if need to check imports. // Check if need to check imports.
if isCheckImport { if isCheckImport {
for _, d := range dirs { for _, d := range dirs {
// Check if current directory is example.
if !isDownloadEx && strings.Contains(d, "example") {
continue
}
dir, err := os.Open(d) dir, err := os.Open(d)
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err

4
gpm.go

@ -159,8 +159,8 @@ func initialize() bool {
} }
// Create bundle and snapshot directories. // Create bundle and snapshot directories.
os.MkdirAll(appPath+"bundles", os.ModePerm) os.MkdirAll(appPath+"repo/bundles/", os.ModePerm)
os.MkdirAll(appPath+"snapshots", os.ModePerm) os.MkdirAll(appPath+"repo/snapshots/", os.ModePerm)
return true return true
} }

Loading…
Cancel
Save