diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-08-11 20:19:07 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-08-11 20:19:07 +0200 |
commit | f6ae436c5878bafeafa0bb2646a2c9b32c9b4380 (patch) | |
tree | d429ee2c8803e1d80f33db076a9cb0df49dd58e9 /publisher | |
parent | 2182ecfd34a24521bf0e3c939627a55327eb1e19 (diff) | |
download | hugo-f6ae436c5878bafeafa0bb2646a2c9b32c9b4380.tar.gz hugo-f6ae436c5878bafeafa0bb2646a2c9b32c9b4380.zip |
publisher: Close file when done
Fixes #5062
Diffstat (limited to 'publisher')
-rw-r--r-- | publisher/publisher.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/publisher/publisher.go b/publisher/publisher.go index be4472791..de9b03d0d 100644 --- 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 { |