]> Sergey Matveev's repositories - sgblog.git/blobdiff - cmd/sgblog/img.go
Images in gopher/gemini
[sgblog.git] / cmd / sgblog / img.go
index 7f97d98417bf2af977ef7dc3e1c88b585d0e51d4..46a19216765a9f9ce319dc480df296a4265206b1 100644 (file)
@@ -45,7 +45,7 @@ func listImgs(cfg *Cfg, what plumbing.Hash) (out []Img) {
                        typ = "application/octet-stream"
                }
                out = append(out, Img{
-                       Path: path.Join(sub, ent.Name()),
+                       Path: path.Join(sub, strings.ReplaceAll(ent.Name(), " ", "%20")),
                        Alt:  strings.TrimSuffix(name, ext),
                        Size: info.Size(),
                        Typ:  typ,