summaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-07-04 22:43:39 -0400
committerUnknown <joe2010xtmf@163.com>2014-07-04 22:43:39 -0400
commitfd5412ec47018a72c1f05aca487e10ea0a665e45 (patch)
tree3c36958f40764b3bcaa4247f7a578640e7c40751 /models/org.go
parentbaa255e8991edaa69c29794553dcb37ecbc6b78d (diff)
downloadgitea-fd5412ec47018a72c1f05aca487e10ea0a665e45.tar.gz
gitea-fd5412ec47018a72c1f05aca487e10ea0a665e45.zip
Work on #274
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go6
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,