Skip to content

Commit 7e2466b

Browse files
committed
Fix test
1 parent ad77361 commit 7e2466b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/setting/setting.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,11 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
768768
}
769769
StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(StaticRootPath)
770770
StaticCacheTime = sec.Key("STATIC_CACHE_TIME").MustDuration(6 * time.Hour)
771-
AppDataPath = sec.Key("APP_DATA_PATH").MustString(path.Join(AppWorkPath, "data"))
771+
appDataPath := sec.Key("APP_DATA_PATH").MustString(path.Join(AppWorkPath, "data"))
772+
AppDataPath, err = filepath.Abs(appDataPath)
773+
if err != nil {
774+
log.Fatal("Invalid APP_DATA_PATH '%s': %s", appDataPath, err)
775+
}
772776

773777
EnableGzip = sec.Key("ENABLE_GZIP").MustBool()
774778
EnablePprof = sec.Key("ENABLE_PPROF").MustBool(false)

0 commit comments

Comments
 (0)