Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorNoah Campbell <noahcampbell@gmail.com>2013-09-12 21:48:59 +0400
committerNoah Campbell <noahcampbell@gmail.com>2013-09-12 21:48:59 +0400
commit74b55fc7c87f2887c42ce8626cb461fee5d7b907 (patch)
treefd071f824ac14cff6ddaf9c9582a65843a6ab316 /source
parent998b2f73f8da8886be87c29e23623d24445cbe93 (diff)
Normalize paths within hugo
filepath was used inconsistently throughout the hugolib. With the introduction of source and target modules, all path are normalized to "/". This simplifies the processing of paths. It does mean that contributors need to be aware of using path/filepath in any module other than source or target is not recommended. The current exception is hugolib/config.go
Diffstat (limited to 'source')
-rw-r--r--source/filesystem.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/filesystem.go b/source/filesystem.go
index 5434431aa..da3983aec 100644
--- a/source/filesystem.go
+++ b/source/filesystem.go
@@ -27,6 +27,7 @@ func (f *Filesystem) Files() []*File {
}
func (f *Filesystem) add(name string, reader io.Reader) {
+ name = filepath.ToSlash(name)
f.files = append(f.files, &File{Name: name, Contents: reader})
}