diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-30 10:18:36 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-30 10:18:36 +0800 |
commit | 50391f434e9f7f216ce0f907b532cbe4ca2bbeb2 (patch) | |
tree | 0d758524188dd0ebc5bd83278e20fade1097c03d /models | |
parent | ec1b801732b030648c060d26ce5a3ed8cf2e822c (diff) | |
download | gitea-50391f434e9f7f216ce0f907b532cbe4ca2bbeb2.tar.gz gitea-50391f434e9f7f216ce0f907b532cbe4ca2bbeb2.zip |
bug fixed
Diffstat (limited to 'models')
-rw-r--r-- | models/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go index 4be655d287..7cecdea49a 100644 --- a/models/repo.go +++ b/models/repo.go @@ -10,6 +10,7 @@ import ( "io/ioutil" "os" "os/exec" + "path" "path/filepath" "regexp" "strings" @@ -162,7 +163,7 @@ func CreateRepository(user *User, repoName, desc, repoLang, license string, priv access := Access{ UserName: user.Name, - RepoName: repo.Name, + RepoName: strings.ToLower(path.Join(user.Name, repo.Name)), Mode: AU_WRITABLE, } if _, err = session.Insert(&access); err != nil { @@ -510,7 +511,6 @@ func NotifyWatchers(act *Action) error { continue } - act.Id = 0 act.UserId = watches[i].UserId if _, err = orm.InsertOne(act); err != nil { return errors.New("repo.NotifyWatchers(create action): " + err.Error()) |