mirror of
https://github.com/syncthing/syncthing.git
synced 2026-09-28 07:15:38 -04:00
lib/model: Correct handling of fakefs cache
We looked under one cache key, then stored under another...
This commit is contained in:
1 parent
591e4d8af1
commit
f1bf4d899a
1 file changed
+1
-3
+1
-3
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user