From e1332c52399e5dae3a282697bd265121be61a086 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 1 Jun 2014 21:47:48 -0400 Subject: [PATCH] Fix #230 --- models/repo.go | 6 +++--- models/user.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/models/repo.go b/models/repo.go index 90e5e36b..d13c349f 100644 --- a/models/repo.go +++ b/models/repo.go @@ -30,9 +30,9 @@ import ( var ( ErrRepoAlreadyExist = errors.New("Repository already exist") ErrRepoNotExist = errors.New("Repository does not exist") - ErrRepoFileNotExist = errors.New("Target Repo file does not exist") + ErrRepoFileNotExist = errors.New("Repository file does not exist") ErrRepoNameIllegal = errors.New("Repository name contains illegal characters") - ErrRepoFileNotLoaded = errors.New("repo file not loaded") + ErrRepoFileNotLoaded = errors.New("Repository file not loaded") ErrMirrorNotExist = errors.New("Mirror does not exist") ) @@ -45,7 +45,7 @@ func getAssetList(prefix string) []string { assets := make([]string, 0, 15) for _, name := range bin.AssetNames() { if strings.HasPrefix(name, prefix) { - assets = append(assets, name) + assets = append(assets, strings.TrimPrefix(name, prefix+"/")) } } return assets diff --git a/models/user.go b/models/user.go index dd70a35f..f95f303b 100644 --- a/models/user.go +++ b/models/user.go @@ -121,7 +121,7 @@ func IsEmailUsed(email string) (bool, error) { return orm.Get(&User{Email: email}) } -// return a user salt token +// GetUserSalt returns a user salt token func GetUserSalt() string { return base.GetRandomString(10) }