diff options
author | Unknown <joe2010xtmf@163.com> | 2014-06-24 09:59:21 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-06-24 09:59:21 -0400 |
commit | ceb415df8a5ba9e33840df5d635765424a2bee8e (patch) | |
tree | a28c945df82f4c5e9a8a6fd4070f9634d75fd6a5 /modules | |
parent | 98f614a58e984b386a464bc687086e096f03026a (diff) | |
parent | 63770d93a1e052140d75ebed83e4927f15e007fe (diff) | |
download | gitea-ceb415df8a5ba9e33840df5d635765424a2bee8e.tar.gz gitea-ceb415df8a5ba9e33840df5d635765424a2bee8e.zip |
Merge branch 'master' of github.com:gogits/gogs into dev
Diffstat (limited to 'modules')
-rw-r--r-- | modules/setting/setting.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 1298996396..cb7734bb32 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -182,6 +182,12 @@ func NewConfigContext() { log.Fatal("Fail to get home directory: %v", err) } RepoRootPath = Cfg.MustValue("repository", "ROOT", filepath.Join(homeDir, "gogs-repositories")) + if !filepath.IsAbs(RepoRootPath) { + RepoRootPath = filepath.Join(workDir, RepoRootPath) + } else { + RepoRootPath = filepath.Clean(RepoRootPath) + } + if err = os.MkdirAll(RepoRootPath, os.ModePerm); err != nil { log.Fatal("Fail to create repository root path(%s): %v", RepoRootPath, err) } |