From a9ee700aad2133766d06e55df6e8092d6dcaab07 Mon Sep 17 00:00:00 2001 From: Douglas Pi Date: Sun, 25 Aug 2024 20:16:10 +0300 Subject: [PATCH] Fix Windows slashes --- files/files.go | 2 +- hyphae/files.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/files.go b/files/files.go index 97cafb4..b549e83 100644 --- a/files/files.go +++ b/files/files.go @@ -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 } diff --git a/hyphae/files.go b/hyphae/files.go index 43b8c67..a0ee9cc 100644 --- a/hyphae/files.go +++ b/hyphae/files.go @@ -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 {