0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-17 15:31:06 +01:00
This commit is contained in:
Unknown 2014-06-01 21:47:48 -04:00
parent afc6cbc479
commit e1332c5239
2 changed files with 4 additions and 4 deletions

View file

@ -30,9 +30,9 @@ import (
var ( var (
ErrRepoAlreadyExist = errors.New("Repository already exist") ErrRepoAlreadyExist = errors.New("Repository already exist")
ErrRepoNotExist = errors.New("Repository does not 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") 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") ErrMirrorNotExist = errors.New("Mirror does not exist")
) )
@ -45,7 +45,7 @@ func getAssetList(prefix string) []string {
assets := make([]string, 0, 15) assets := make([]string, 0, 15)
for _, name := range bin.AssetNames() { for _, name := range bin.AssetNames() {
if strings.HasPrefix(name, prefix) { if strings.HasPrefix(name, prefix) {
assets = append(assets, name) assets = append(assets, strings.TrimPrefix(name, prefix+"/"))
} }
} }
return assets return assets

View file

@ -121,7 +121,7 @@ func IsEmailUsed(email string) (bool, error) {
return orm.Get(&User{Email: email}) return orm.Get(&User{Email: email})
} }
// return a user salt token // GetUserSalt returns a user salt token
func GetUserSalt() string { func GetUserSalt() string {
return base.GetRandomString(10) return base.GetRandomString(10)
} }