mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-13 03:43:41 +00:00
feat: web config add stroage dir item (#428)
This commit is contained in:
2 files changed
+19
-9
No files matched your search
+9
-4
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user