shithub: hugo

Download patch

ref: f4675fa0f0fae2358adfaea49e8da824ee094495
parent: ebb56e8bdbfaf4f955326017e40b2805850871e9
author: Bjørn Erik Pedersen <[email protected]>
date: Tue Aug 28 13:08:52 EDT 2018

helpers: Fix permissions when creating new folders

This was mistakingly changed from 07777 (rwx, rw, r before umask) to 0755 in Hugo 0.37. This commit reverts to the old value.

Fixes #5128

--- a/helpers/path.go
+++ b/helpers/path.go
@@ -573,7 +573,7 @@
 		if !os.IsNotExist(err) {
 			return nil, err
 		}
-		if err = fs.MkdirAll(filepath.Dir(filename), 0755); err != nil {
+		if err = fs.MkdirAll(filepath.Dir(filename), 0777); err != nil { // rwx, rw, r before umask
 			return nil, err
 		}
 		f, err = fs.Create(filename)