diff options
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 4110548362..6fda2f42fd 100644 --- a/models/repo.go +++ b/models/repo.go @@ -10,6 +10,7 @@ import ( "io/ioutil" "os" "os/exec" + "path" "path/filepath" "strings" "time" @@ -157,7 +158,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 { @@ -512,7 +513,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()) |