Browse Source

Move custom dir to custom/

tags/v0.9.99
Unknown 10 years ago
parent
commit
8dd956f88a
3 changed files with 4 additions and 5 deletions
  1. 1
    1
      .gitignore
  2. 2
    3
      modules/base/conf.go
  3. 1
    1
      serve.go

+ 1
- 1
.gitignore View File

@@ -4,4 +4,4 @@ gogs
.DS_Store
*.db
*.log
conf/custom.ini
custom/

+ 2
- 3
modules/base/conf.go View File

@@ -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)

+ 1
- 1
serve.go View File

@@ -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
}


Loading…
Cancel
Save