summaryrefslogtreecommitdiffstats
path: root/hugolib/hugo_sites.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-12-30 10:50:00 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-01 18:19:49 +0100
commitff6253bc7cf745e9c0127ddc9006da3c2c00c738 (patch)
tree9e80cc607575e516f4f93e0f16c3e82df3bafdb5 /hugolib/hugo_sites.go
parentaa4ccb8a1e9b8aa17397acf34049a2aa16b0b6cb (diff)
Support files in content mounts
This commit is a general improvement of handling if single file mounts. Fixes #6684 Fixes #6696
Diffstat (limited to 'hugolib/hugo_sites.go')
-rw-r--r--hugolib/hugo_sites.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go
index 8c29e2a88..4e1623b2e 100644
--- a/hugolib/hugo_sites.go
+++ b/hugolib/hugo_sites.go
@@ -895,7 +895,7 @@ func (m *contentChangeMap) add(dirname string, tp bundleDirType) {
m.mu.Unlock()
}
-func (m *contentChangeMap) resolveAndRemove(filename string) (string, string, bundleDirType) {
+func (m *contentChangeMap) resolveAndRemove(filename string) (string, bundleDirType) {
m.mu.RLock()
defer m.mu.RUnlock()
@@ -908,22 +908,22 @@ func (m *contentChangeMap) resolveAndRemove(filename string) (string, string, bu
if _, found := m.branchBundles[dir]; found {
delete(m.branchBundles, dir)
- return dir, dir, bundleBranch
+ return dir, bundleBranch
}
if key, _, found := m.leafBundles.LongestPrefix(dir); found {
m.leafBundles.Delete(key)
dir = string(key)
- return dir, dir, bundleLeaf
+ return dir, bundleLeaf
}
fileTp, isContent := classifyBundledFile(name)
if isContent && fileTp != bundleNot {
// A new bundle.
- return dir, dir, fileTp
+ return dir, fileTp
}
- return dir, filename, bundleNot
+ return dir, bundleNot
}