From eb1b26017a558e82dd293f18d4478c3dcc4bf21a Mon Sep 17 00:00:00 2001 From: SATO taichi Date: Fri, 28 Feb 2014 20:33:10 +0900 Subject: [PATCH] Use / in the name of the asset. Windows path separator is not / in \. --- convert.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/convert.go b/convert.go index c384cf4..c9a67e8 100644 --- a/convert.go +++ b/convert.go @@ -82,6 +82,7 @@ func findFiles(dir, prefix string, recursive bool, toc *[]Asset) error { if len(prefix) > 0 { dir, _ = filepath.Abs(dir) prefix, _ = filepath.Abs(prefix) + prefix = filepath.ToSlash(prefix) } fd, err := os.Open(dir) @@ -99,7 +100,7 @@ func findFiles(dir, prefix string, recursive bool, toc *[]Asset) error { for _, file := range list { var asset Asset asset.Path = filepath.Join(dir, file.Name()) - asset.Name = asset.Path + asset.Name = filepath.ToSlash(asset.Path) if file.IsDir() { if recursive {