Skip to content

Commit 3101aee

Browse files
committed
skip directory creation in equation directory
1 parent 99cb8d6 commit 3101aee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webtex_api/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func EquationSvg(equation string, cacheDir string, template *template.Template,
7878
h := sha1.New()
7979
h.Write([]byte(equation))
8080
sha := hex.EncodeToString(h.Sum(nil))
81-
filenameEnd := path.Join(sha[0:2], fmt.Sprintf("%s.svg", sha))
81+
filenameEnd := fmt.Sprintf("%s.svg", sha)
8282
filename := path.Join(cacheDir, filenameEnd)
8383

8484
if _, err := os.Stat(filename); err == nil {

0 commit comments

Comments
 (0)