Fix 0.62.1 server rebuild slowdown regression

Fixes #6784
This commit is contained in:
Bjørn Erik Pedersen
2020-01-22 11:57:23 +01:00
parent 2fefc01606
commit 17af79a03e
10 changed files with 186 additions and 36 deletions

View File

@@ -57,12 +57,8 @@ func NewRootMappingFs(fs afero.Fs, rms ...RootMapping) (*RootMappingFs, error) {
// Extract "blog" from "content/blog"
rm.path = strings.TrimPrefix(strings.TrimPrefix(rm.From, fromBase), filepathSeparator)
if rm.Meta != nil {
rm.Meta[metaKeyIsFileMount] = !fi.IsDir()
rm.Meta[metaKeyBaseDir] = rm.ToBasedir
rm.Meta[metaKeyMountRoot] = rm.path
if rm.ToBasedir != "" {
pathFile := strings.TrimPrefix(strings.TrimPrefix(rm.To, rm.ToBasedir), filepathSeparator)
rm.Meta[metaKeyPathFile] = pathFile
}
}
meta := copyFileMeta(rm.Meta)