From 91d9dc09fa61dba7e0b7dca0c798b21ce71579b1 Mon Sep 17 00:00:00 2001 From: adnano Date: Tue, 20 Apr 2021 17:50:20 -0400 Subject: [PATCH] Fix copying of static files nested in directories --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index 91a1a6c..21c0fab 100644 --- a/main.go +++ b/main.go @@ -127,6 +127,7 @@ func copyAll(srcDir, dstDir string) error { defer src.Close() dstPath := filepath.Join(dstDir, strings.TrimPrefix(path, srcDir)) + os.MkdirAll(filepath.Dir(dstPath), 0755) dst, err := os.Create(dstPath) if err != nil { return err