feat: web config add stroage dir item (#428)

This commit is contained in:
Levi authored and GitHub committed 2024-03-29 17:10:25 +08:00
1 parent 1d3a028bae
commit bd6d6be71f
2 files changed
+19 -9

No files matched your search

+9 -4
View File
@@ -31,11 +31,16 @@ func main() {
}
}
exe, err := os.Executable()
if err != nil {
panic(err)
var dir string
if args.StorageDir != nil && *args.StorageDir != "" {
dir = *args.StorageDir
} else {
exe, err := os.Executable()
if err != nil {
panic(err)
}
dir = filepath.Dir(exe)
}
dir := filepath.Dir(exe)
cfg := &model.StartConfig{
Network: "tcp",