Skip to content

Commit

Permalink
fix: file path handling
Browse files Browse the repository at this point in the history
  • Loading branch information
zostay committed Aug 9, 2024
1 parent 6f39367 commit b392d86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/config/lazyTools.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ func (t *LazyTools) makeFuncMap(
} else {
filesRoot = filepath.Join(filesRoot, filesDir)
}
} else {
filesRoot = filepath.Join(filesRoot, "files")
}

file := func(app, path string) (string, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/tmpltools/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func File(cloudHome, app, path string) (string, error) {
p := filepath.Join(cloudHome, "files", app+path)
p := filepath.Join(cloudHome, app, path)
data, err := os.ReadFile(p)
log.LineBytes("EMBED", data)
if err != nil {
Expand Down

0 comments on commit b392d86

Please sign in to comment.