resource: Use the correct Destination FS - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit a54fd7df215c1eccb2749e2becdec93766a7b77f
DIR parent 16e1d99c6dd7e2acb362123ee7dea3e221f11177
HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Mon, 1 Jan 2018 14:28:19 +0100
resource: Use the correct Destination FS
Source and destination will be the same when this happens, but it should be correct.
See #4202
Diffstat:
M resource/image.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/resource/image.go b/resource/image.go
@@ -414,7 +414,7 @@ func (i *Image) copyToDestination(src string) error {
if err != nil && os.IsNotExist(err) {
// When called from shortcodes, the target directory may not exist yet.
// See https://github.com/gohugoio/hugo/issues/4202
- if err = i.spec.Fs.Source.MkdirAll(filepath.Dir(target), os.FileMode(0755)); err != nil {
+ if err = i.spec.Fs.Destination.MkdirAll(filepath.Dir(target), os.FileMode(0755)); err != nil {
res = err
return
}