diff options
author | Unknown <joe2010xtmf@163.com> | 2014-07-04 22:43:39 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-07-04 22:43:39 -0400 |
commit | fd5412ec47018a72c1f05aca487e10ea0a665e45 (patch) | |
tree | 3c36958f40764b3bcaa4247f7a578640e7c40751 /models/org.go | |
parent | baa255e8991edaa69c29794553dcb37ecbc6b78d (diff) | |
download | gitea-fd5412ec47018a72c1f05aca487e10ea0a665e45.tar.gz gitea-fd5412ec47018a72c1f05aca487e10ea0a665e45.zip |
Work on #274
Diffstat (limited to 'models/org.go')
-rw-r--r-- | models/org.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/org.go b/models/org.go index 2625ed428d..2efef534b4 100644 --- a/models/org.go +++ b/models/org.go @@ -6,6 +6,7 @@ package models import ( "errors" + "os" "strings" "github.com/gogits/gogs/modules/base" @@ -97,6 +98,11 @@ func CreateOrganization(org, owner *User) (*User, error) { return nil, err } + if err = os.MkdirAll(UserPath(org.Name), os.ModePerm); err != nil { + sess.Rollback() + return nil, err + } + // Create default owner team. t := &Team{ OrgId: org.Id, |