fix serve .

master
Bel LaPointe 2020-01-23 08:08:59 -07:00
parent 16335d796b
commit f53fc80f68
1 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import (
"local/args"
"log"
"os"
"path/filepath"
"strings"
"time"
)
@ -25,7 +26,7 @@ func init() {
}
func Refresh() {
if strings.Contains(fmt.Sprint(os.Args), "-test") {
if strings.Contains(fmt.Sprint(os.Args), " -test") {
return
}
@ -57,6 +58,7 @@ func Refresh() {
}
Root = strings.TrimSuffix(as.Get("root").GetString(), "/")
Root, _ = filepath.Abs(Root)
Port = ":" + strings.TrimPrefix(as.Get("port").GetString(), ":")
Head = string(bs[0])
Foot = string(bs[1])