We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5142c30 + 767a6b3 commit 257af4dCopy full SHA for 257af4d
1 file changed
internal/app/app.go
@@ -317,9 +317,8 @@ func (a *App) serveFoundryModuleZip(c echo.Context) error {
317
c.Response().WriteHeader(http.StatusOK)
318
319
zw := zip.NewWriter(c.Response().Writer)
320
- defer zw.Close()
321
322
- return filepath.WalkDir(moduleDir, func(path string, d fs.DirEntry, err error) error {
+ walkErr := filepath.WalkDir(moduleDir, func(path string, d fs.DirEntry, err error) error {
323
if err != nil {
324
return err
325
}
@@ -347,6 +346,10 @@ func (a *App) serveFoundryModuleZip(c echo.Context) error {
347
346
_, err = w.Write(data)
348
349
})
+ if walkErr != nil {
350
+ return walkErr
351
+ }
352
+ return zw.Close()
353
354
355
// Start begins listening for HTTP requests on the configured port.
0 commit comments