mirror of
https://github.com/MetaCubeX/Clash.Meta.git
synced 2025-04-06 14:43:34 +03:00
Fix: parse external-ui
This commit is contained in:
parent
49635eab6c
commit
ef6260282f
1 changed files with 7 additions and 5 deletions
|
@ -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…
Add table
Reference in a new issue