From 99f11c2876773f9347955add36533da2b5bc9bb5 Mon Sep 17 00:00:00 2001 From: Adnan Maolood 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