summaryrefslogtreecommitdiffstats
path: root/modules/base
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-20 16:04:56 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-20 16:04:56 -0400
commit06631ab91f5d84b48d6f71ac8eaf4df740ba0282 (patch)
tree8bfcccc57550c016b90a73fc57cc24942d508096 /modules/base
parent686348974b1a1f6f11cab5244df2362f99e0a124 (diff)
downloadgitea-06631ab91f5d84b48d6f71ac8eaf4df740ba0282.tar.gz
gitea-06631ab91f5d84b48d6f71ac8eaf4df740ba0282.zip
Basic admin data table, models changes
Diffstat (limited to 'modules/base')
-rw-r--r--modules/base/conf.go21
1 files changed, 15 insertions, 6 deletions
diff --git a/modules/base/conf.go b/modules/base/conf.go
index fdbf3ad385..81f32bd591 100644
--- a/modules/base/conf.go
+++ b/modules/base/conf.go
@@ -26,12 +26,14 @@ type Mailer struct {
}
var (
- AppVer string
- AppName string
- AppLogo string
- AppUrl string
- Domain string
- SecretKey string
+ AppVer string
+ AppName string
+ AppLogo string
+ AppUrl string
+ Domain string
+ SecretKey string
+ RepoRootPath string
+
Cfg *goconfig.ConfigFile
MailService *Mailer
)
@@ -173,6 +175,13 @@ func init() {
AppUrl = Cfg.MustValue("server", "ROOT_URL")
Domain = Cfg.MustValue("server", "DOMAIN")
SecretKey = Cfg.MustValue("security", "SECRET_KEY")
+
+ // Determine and create root git reposiroty path.
+ RepoRootPath = Cfg.MustValue("repository", "ROOT")
+ if err = os.MkdirAll(RepoRootPath, os.ModePerm); err != nil {
+ fmt.Printf("models.init(fail to create RepoRootPath(%s)): %v\n", RepoRootPath, err)
+ os.Exit(2)
+ }
}
func NewServices() {