hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit f6ae436c5878bafeafa0bb2646a2c9b32c9b4380
parent 2182ecfd34a24521bf0e3c939627a55327eb1e19
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Sat, 11 Aug 2018 20:19:07 +0200

publisher: Close file when done

Fixes #5062

Diffstat:
Mpublisher/publisher.go | 1+
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/publisher/publisher.go b/publisher/publisher.go
@@ -108,6 +108,7 @@ func (p DestinationPublisher) Publish(d Descriptor) error {
 	if err != nil {
 		return err
 	}
+	defer f.Close()
 
 	_, err = io.Copy(f, src)
 	if err == nil && d.StatCounter != nil {