commit bc2ecc91dbb07b24e462232e42b64c748e6ae0a0
parent 26ff2bb7237b5abbc0978cf0b269ddbd20467f9d
Author: weetat <wtenison@protonmail.com>
Date: Mon, 24 Feb 2025 03:18:16 +0000
Fixed 'script.js' path error in 'home/index.html'
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/network/network.go b/src/network/network.go
@@ -58,7 +58,7 @@ func Init() {
mux.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
// log.Printf("CALL\tmain:mux.HandleFunc:%s\n", r.URL)
- http.ServeFile(w, r, mfs.Paths.WebDirectory+"/global/favicon.ico")
+ http.ServeFile(w, r, filepath.Join(mfs.Paths.WebDirectory, "/global/favicon.ico"))
// log.Printf("DONE\tmain:mux.HandleFunc:%s\n", r.URL)
})
@@ -66,7 +66,7 @@ func Init() {
log.Printf("CALL\tmain:mux.HandleFunc:%s\n", r.URL)
// Produce URL path to directory relation.
- _r, _err := mfs.MakeDirectorySig(mfs.Paths.WebDirectory+"/home", 0, mfs.FilePatternHTML)
+ _r, _err := mfs.MakeDirectorySig(filepath.Join(mfs.Paths.WebDirectory, "/home"), 0, mfs.FilePatternHTML)
if _err != nil {
log.Printf("_ERROR\tmain:HandleFunc(\"/\"):MakeResourceSig():%s\n", _err)
http.NotFound(w, r)
diff --git a/web/home/index.html b/web/home/index.html
@@ -5,7 +5,7 @@
<title>Miki</title>
<meta name="viewport" charset="utf-8" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/web/global/styles.css" />
- <script src="/web/global/styles.css" defer></script>
+ <script src="/web/global/script.js" defer></script>
</head>
<body>