cache/filecache: Skip resource cache init if the fs is missing
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 26 Jul 2019 08:45:07 +0000 (10:45 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 26 Jul 2019 08:45:07 +0000 (10:45 +0200)
Fixes #6113

cache/filecache/filecache.go

index bf004c8f7b65ff2a0a01082b6292d43ab60de051..216c280c2ce80ec0ef914f87aac7a40e2102d493 100644 (file)
@@ -330,6 +330,9 @@ func NewCaches(p *helpers.PathSpec) (Caches, error) {
 
                if v.isResourceDir {
                        cfs = p.BaseFs.ResourcesCache
+                       if cfs == nil {
+                               continue
+                       }
                } else {
                        cfs = fs
                }