Fix open URI RIVM-20

This commit is contained in:
Mihail Slobodyanuk 2022-12-12 12:27:08 +02:00
parent 8cace274d0
commit 6eaf4eee0c

View file

@ -109,7 +109,7 @@ func main() {
panic(errors.New(fmt.Sprintf("Index file %v not found", confui.IndexHtml))) panic(errors.New(fmt.Sprintf("Index file %v not found", confui.IndexHtml)))
} }
path_prefix := "" path_prefix := ""
if len(indexUrl.Scheme) == 1 { if indexUrl != nil && len(indexUrl.Scheme) == 1 {
path_prefix = "/" path_prefix = "/"
} }
indexUrl, err = url.ParseRequestURI("file://" + path_prefix + strings.ReplaceAll(confui.IndexHtml, "\\", "/")) indexUrl, err = url.ParseRequestURI("file://" + path_prefix + strings.ReplaceAll(confui.IndexHtml, "\\", "/"))