From abcd073643b2a5a5e518479c97c7d4cb46537093 Mon Sep 17 00:00:00 2001 From: royalcat Date: Sun, 1 Sep 2024 02:10:47 +0300 Subject: [PATCH] fix resolver lock --- src/vfs/resolver.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vfs/resolver.go b/src/vfs/resolver.go index 481dc92..3c697b6 100644 --- a/src/vfs/resolver.go +++ b/src/vfs/resolver.go @@ -235,6 +235,9 @@ func (r *Resolver) nestedFs(ctx context.Context, fsPath string, file File) (File return nil, fmt.Errorf("error calculating file hash: %w", err) } + r.m.Lock() + defer r.m.Unlock() + if nestedFs, ok := r.fsmap[fileHash]; ok { return nestedFs, file.Close(ctx) }