From 8dd956f88a0d279296e5b5440cde8bd877ca0fea Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 12 Mar 2014 21:40:18 -0400 Subject: [PATCH] Move custom dir to custom/ --- .gitignore | 2 +- modules/base/conf.go | 5 ++--- serve.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 49d19b83d..0323c2972 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ gogs .DS_Store *.db *.log -conf/custom.ini \ No newline at end of file +custom/ \ No newline at end of file diff --git a/modules/base/conf.go b/modules/base/conf.go index 1240448c1..809b2b8c1 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -37,15 +37,14 @@ func init() { os.Exit(2) } - cfgPathPrefix := filepath.Join(workDir, "conf") - cfgPath := filepath.Join(cfgPathPrefix, "app.ini") + cfgPath := filepath.Join(workDir, "conf/app.ini") Cfg, err = goconfig.LoadConfigFile(cfgPath) if err != nil { fmt.Printf("Cannot load config file '%s'\n", cfgPath) os.Exit(2) } - cfgPath = filepath.Join(cfgPathPrefix, "custom.ini") + cfgPath = filepath.Join(workDir, "custom/conf/app.ini") if com.IsFile(cfgPath) { if err = Cfg.AppendFiles(cfgPath); err != nil { fmt.Printf("Cannot load config file '%s'\n", cfgPath) diff --git a/serve.go b/serve.go index d4874b3ed..97b9c567e 100644 --- a/serve.go +++ b/serve.go @@ -58,7 +58,7 @@ func runServ(*cli.Context) { cmd := os.Getenv("SSH_ORIGINAL_COMMAND") if cmd == "" { - printf("Hi %s! You've successfully authenticated, but Gogs does not provide shell access.\n", user.Name) + fmt.Printf("Hi %s! You've successfully authenticated, but Gogs does not provide shell access.\n", user.Name) return }