diff --git a/mem/file.go b/mem/file.go index be3673e..9096ff0 100644 --- a/mem/file.go +++ b/mem/file.go @@ -107,6 +107,8 @@ func (f *File) Close() error { } func (f *File) Name() string { + f.fileData.Lock() + defer f.fileData.Unlock() return f.fileData.name }