mirror of
https://github.com/rclone/rclone.git
synced 2025-01-09 15:58:28 +01:00
fs/cache: unlock mutex in cache.Get to allow recursive calls
This fixes the test lockup in the union tests
This commit is contained in:
parent
d2be792d5e
commit
f3719fe269
2
fs/cache/cache.go
vendored
2
fs/cache/cache.go
vendored
@ -30,7 +30,9 @@ func Get(fsString string) (f fs.Fs, err error) {
|
||||
defer fsCacheMu.Unlock()
|
||||
entry, ok := fsCache[fsString]
|
||||
if !ok {
|
||||
fsCacheMu.Unlock() // Unlock in case Get is called recursively
|
||||
f, err = fsNewFs(fsString)
|
||||
fsCacheMu.Lock()
|
||||
if err != nil && err != fs.ErrorIsFile {
|
||||
return f, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user