From b31b0dfa696a53c6a5047dae7479174653e71536 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 20 May 2013 17:55:28 -0400 Subject: [PATCH] little fix --- doc/github.go | 10 ++++------ gpm.go | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/doc/github.go b/doc/github.go index e14854e2c..f4da49095 100644 --- a/doc/github.go +++ b/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. if strings.HasSuffix(absPath, "/") { // Directory. - dirs = append(dirs, absPath) + // Check if current directory is example. + if !(!isDownloadEx && strings.Contains(absPath, "example")) { + dirs = append(dirs, absPath) + } continue } @@ -143,11 +146,6 @@ func GetGithubDoc(client *http.Client, match map[string]string, commit string, i // Check if need to check imports. if isCheckImport { for _, d := range dirs { - // Check if current directory is example. - if !isDownloadEx && strings.Contains(d, "example") { - continue - } - dir, err := os.Open(d) if err != nil { return nil, nil, err diff --git a/gpm.go b/gpm.go index 0020e9ad7..1d21a97d1 100644 --- a/gpm.go +++ b/gpm.go @@ -159,8 +159,8 @@ func initialize() bool { } // Create bundle and snapshot directories. - os.MkdirAll(appPath+"bundles", os.ModePerm) - os.MkdirAll(appPath+"snapshots", os.ModePerm) + os.MkdirAll(appPath+"repo/bundles/", os.ModePerm) + os.MkdirAll(appPath+"repo/snapshots/", os.ModePerm) return true }