summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-06-01 21:47:48 -0400
committerUnknown <joe2010xtmf@163.com>2014-06-01 21:47:48 -0400
commite1332c52399e5dae3a282697bd265121be61a086 (patch)
tree0fe36c249ed532c34514166a53a87ac42c91169b
parentafc6cbc4797571a138eb150768fb9276b4da702b (diff)
downloadgitea-e1332c52399e5dae3a282697bd265121be61a086.tar.gz
gitea-e1332c52399e5dae3a282697bd265121be61a086.zip
Fix #230
-rw-r--r--models/repo.go6
-rw-r--r--models/user.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/models/repo.go b/models/repo.go
index 90e5e36b16..d13c349f11 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 dd70a35f0b..f95f303b2b 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)
}