diff --git a/system/setup.go b/system/setup.go index 8817063..1e4803c 100644 --- a/system/setup.go +++ b/system/setup.go @@ -67,15 +67,19 @@ func Setup() { segs := strings.Split(c, ":") file := segs[len(segs)-2] short := file - skip := false + ptr := 0 for i := len(file) - 1; i > 0; i-- { if file[i] == '/' { - if !skip { - skip = true - continue + if ptr == 0 { + short = file[i+1:] + ptr = i + } else { + short = fmt.Sprintf("%v/%v", file[i+1:ptr], short) + break } - short = file[i+1:] - break + } + if file[i] == '@' { + ptr = i } } return fmt.Sprintf("%v:%v", short, segs[len(segs)-1])