preserve file times when copying from static/
Alan Pearce alan@alanpearce.eu
Fri, 19 Apr 2024 07:30:27 +0200
1 files changed, 3 insertions(+), 1 deletions(-)
jump to
M cmd/build/build.go → cmd/build/build.go
@@ -534,7 +534,9 @@ err = os.RemoveAll("public") if err != nil { log.Panic(errors.Errorf("could not remove public directory: %v", err)) } - err = cp.Copy("static", "public", cp.Options{}) + err = cp.Copy("static", "public", cp.Options{ + PreserveTimes: true, + }) if err != nil { log.Panic(errors.Errorf("could not copy static files: %v", err)) }