Damn. I messed that up


On Fri, Nov 15, 2013 at 10:34 AM, Keith Rarick <notifications@github.com>wrote:

> In filesystem.go:
>
> > @@ -33,4 +30,17 @@ func (f *fs) ReadDir(dirname string) ([]os.FileInfo, error) { return ioutil.Read
> >
> >  func (f *fs) Lstat(name string) (os.FileInfo, error) { return os.Lstat(name) }
> >
> > -func (f *fs) Join(elem ...string) string { return filepath.Join(elem...) }
> > +func (f *fs) PathSeparator() byte { return os.PathSeparator }
> > +
> > +// Join joins any number of path elements into a single path, adding
> > +// a Separator if necessary. The result is Cleaned, in particular
> > +// all empty strings are ignored.
> > +func Join(fs FileSystem, elem ...string) string {
> > +	sep := string(fs.PathSeparator())
> > +	for i, e := range elem {
> > +		if e != "" {
> > +			return filepath.Clean(strings.Join(elem[i:], sep))
>
> filepath.Clean doesn't take a separator.
> It uses os.PathSeparator directly.
>
> The separator here is for strings.Join.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/kr/fs/pull/5/files#r7677532>
> .
>