mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 09:23:09 +00:00
Fix copying of static files nested in directories
This commit is contained in:
parent
4639df3dc2
commit
99f11c2876
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