Use / in the name of the asset.

Windows path separator is not / in \.
pull/4/head
SATO taichi 2014-02-28 20:33:10 +09:00
parent 1c1928d3b6
commit eb1b26017a
1 changed files with 2 additions and 1 deletions

View File

@ -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 {