mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
lib/model: Correct handling of fakefs cache
We looked under one cache key, then stored under another...
This commit is contained in:
parent
591e4d8af1
commit
f1bf4d899a
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user