From c5621b3590b79644b5c6feba96b41fd502671762 Mon Sep 17 00:00:00 2001 From: Albert Z Wang Date: Wed, 29 Nov 2017 13:56:26 -0500 Subject: [PATCH] clean basepath before stripping --- basepath.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basepath.go b/basepath.go index b24fb0f..004aeaa 100644 --- a/basepath.go +++ b/basepath.go @@ -29,7 +29,7 @@ type BasePathFile struct { func (f *BasePathFile) Name() string { sourcename := f.File.Name() - return strings.TrimPrefix(sourcename, f.path) + return strings.TrimPrefix(sourcename, filepath.Clean(f.path)) } func NewBasePathFs(source Fs, path string) Fs {