Skip to content

Commit 3fe5cd7

Browse files
committed
Fix bug
1 parent 3382a56 commit 3fe5cd7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/setting/setting.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ func loadRunModeFrom(rootCfg ConfigProvider) {
186186

187187
func loadTempDir(rootCfg ConfigProvider) {
188188
rootSec := rootCfg.Section("")
189-
tempDir := rootSec.Key("TEMP_DIR").MustString(filepath.Join(os.TempDir(), "gitea"))
190-
if tempDir != "" {
191-
if err := os.MkdirAll(tempDir, os.ModePerm); err != nil {
192-
log.Fatal("Failed to create temp directory %s: %v", tempDir, err)
189+
TempPath = rootSec.Key("TEMP_PATH").MustString(filepath.Join(os.TempDir(), "gitea"))
190+
if TempPath != "" {
191+
if err := os.MkdirAll(TempPath, os.ModePerm); err != nil {
192+
log.Fatal("Failed to create temp directory %s: %v", TempPath, err)
193193
}
194194
}
195195
}

0 commit comments

Comments
 (0)