mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
Fix copying of static files nested in directories
This commit is contained in:
parent
efbd6cba45
commit
91d9dc09fa
1
main.go
1
main.go
|
@ -127,6 +127,7 @@ func copyAll(srcDir, dstDir string) error {
|
||||||
defer src.Close()
|
defer src.Close()
|
||||||
|
|
||||||
dstPath := filepath.Join(dstDir, strings.TrimPrefix(path, srcDir))
|
dstPath := filepath.Join(dstDir, strings.TrimPrefix(path, srcDir))
|
||||||
|
os.MkdirAll(filepath.Dir(dstPath), 0755)
|
||||||
dst, err := os.Create(dstPath)
|
dst, err := os.Create(dstPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue