mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
resource: Use the correct Destination FS
Source and destination will be the same when this happens, but it should be correct. See #4202
This commit is contained in:
@@ -414,7 +414,7 @@ func (i *Image) copyToDestination(src string) error {
|
|||||||
if err != nil && os.IsNotExist(err) {
|
if err != nil && os.IsNotExist(err) {
|
||||||
// When called from shortcodes, the target directory may not exist yet.
|
// When called from shortcodes, the target directory may not exist yet.
|
||||||
// See https://github.com/gohugoio/hugo/issues/4202
|
// 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
|
res = err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user