forked from NYANDEV/forgejo
Remove redundant nil check.
This commit is contained in:
parent
8ab5399e83
commit
d3ca5accfd
1 changed files with 0 additions and 10 deletions
|
@ -242,16 +242,6 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set default log path if empty.
|
|
||||||
workDir, err := setting.WorkDir()
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(4, "Fail to get work directory: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(form.LogRootPath) == 0 {
|
|
||||||
form.LogRootPath = path.Join(workDir, "log")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test log root path.
|
// Test log root path.
|
||||||
form.LogRootPath = strings.Replace(form.LogRootPath, "\\", "/", -1)
|
form.LogRootPath = strings.Replace(form.LogRootPath, "\\", "/", -1)
|
||||||
if err := os.MkdirAll(form.LogRootPath, os.ModePerm); err != nil {
|
if err := os.MkdirAll(form.LogRootPath, os.ModePerm); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue