mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-01-05 17:13:32 +08:00
Fix: parse external-ui
This commit is contained in:
parent
49635eab6c
commit
ef6260282f
@ -153,12 +153,14 @@ func parseGeneral(cfg *rawConfig) (*General, error) {
|
||||
mode := cfg.Mode
|
||||
logLevel := cfg.LogLevel
|
||||
|
||||
if !filepath.IsAbs(externalUI) {
|
||||
externalUI = filepath.Join(C.Path.HomeDir(), externalUI)
|
||||
}
|
||||
if externalUI != "" {
|
||||
if !filepath.IsAbs(externalUI) {
|
||||
externalUI = filepath.Join(C.Path.HomeDir(), externalUI)
|
||||
}
|
||||
|
||||
if _, err := os.Stat(externalUI); os.IsNotExist(err) {
|
||||
return nil, fmt.Errorf("external-ui: %s not exist", externalUI)
|
||||
if _, err := os.Stat(externalUI); os.IsNotExist(err) {
|
||||
return nil, fmt.Errorf("external-ui: %s not exist", externalUI)
|
||||
}
|
||||
}
|
||||
|
||||
general := &General{
|
||||
|
Loading…
x
Reference in New Issue
Block a user