From f1bf4d899a0853aefc1ec869df07ecbc54b49f01 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 17 Nov 2021 11:42:20 +0100 Subject: [PATCH] lib/model: Correct handling of fakefs cache We looked under one cache key, then stored under another... --- lib/fs/fakefs.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/fs/fakefs.go b/lib/fs/fakefs.go index 4d75ab0f1..7bc356d98 100644 --- a/lib/fs/fakefs.go +++ b/lib/fs/fakefs.go @@ -89,11 +89,9 @@ func newFakeFilesystem(rootURI string, _ ...Option) *fakeFS { fakeFSMut.Lock() defer fakeFSMut.Unlock() - root := rootURI var params url.Values uri, err := url.Parse(rootURI) if err == nil { - root = uri.Path params = uri.Query() } @@ -157,7 +155,7 @@ func newFakeFilesystem(rootURI string, _ ...Option) *fakeFS { // the filesystem initially. fs.latency, _ = time.ParseDuration(params.Get("latency")) - fakeFSCache[root] = fs + fakeFSCache[rootURI] = fs return fs }