diff options
author | Noah Campbell <[email protected]> | 2013-09-12 10:48:59 -0700 |
---|---|---|
committer | Noah Campbell <[email protected]> | 2013-09-12 10:48:59 -0700 |
commit | 74b55fc7c87f2887c42ce8626cb461fee5d7b907 (patch) | |
tree | fd071f824ac14cff6ddaf9c9582a65843a6ab316 /source/filesystem.go | |
parent | 998b2f73f8da8886be87c29e23623d24445cbe93 (diff) | |
download | hugo-74b55fc7c87f2887c42ce8626cb461fee5d7b907.tar.gz hugo-74b55fc7c87f2887c42ce8626cb461fee5d7b907.zip |
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/filesystem.go')
-rw-r--r-- | source/filesystem.go | 1 |
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}) } |