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
This commit is contained in:
Noah Campbell
2013-09-12 10:48:59 -07:00
parent 998b2f73f8
commit 74b55fc7c8
8 changed files with 46 additions and 43 deletions

View File

@@ -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})
}