1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-03-10 05:28:20 +00:00

Fix Windows slashes

This commit is contained in:
Douglas Pi 2024-08-25 20:16:10 +03:00 committed by Timur Ismagilov
parent ea7d60dd72
commit a9ee700aad
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ var paths struct {
// A separate function is needed to easily know where a general storage path is
// needed rather than a concrete Git or the whole wiki storage path, so that we
// could easily refactor things later if we'll ever support different storages.
func HyphaeDir() string { return paths.gitRepo }
func HyphaeDir() string { return filepath.ToSlash(paths.gitRepo) }
// GitRepo returns the path to the Git repository of the wiki.
func GitRepo() string { return paths.gitRepo }

View File

@ -73,7 +73,7 @@ func indexHelper(path string, nestLevel uint, ch chan ExistingHypha) {
}
var (
hyphaPartPath = filepath.Join(path, node.Name())
hyphaPartPath = filepath.ToSlash(filepath.Join(path, node.Name()))
hyphaName, isText, skip = mimetype.DataFromFilename(hyphaPartPath)
)
if !skip {