From cdc57db3b3758781bd053228bfb32879b3adf3de Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 4 Nov 2020 01:24:26 +0000 Subject: Fix race conditions --- rows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rows.go') diff --git a/rows.go b/rows.go index 7bbc43d..12d5ddf 100644 --- a/rows.go +++ b/rows.go @@ -290,10 +290,10 @@ func (f *File) GetRowHeight(sheet string, row int) (float64, error) { // after deserialization of xl/sharedStrings.xml. func (f *File) sharedStringsReader() *xlsxSST { var err error - wbPath := f.getWorkbookPath() - relPath := strings.TrimPrefix(filepath.Join(filepath.Dir(wbPath), "_rels", filepath.Base(wbPath)+".rels"), string(filepath.Separator)) f.Lock() defer f.Unlock() + wbPath := f.getWorkbookPath() + relPath := strings.TrimPrefix(filepath.Join(filepath.Dir(wbPath), "_rels", filepath.Base(wbPath)+".rels"), string(filepath.Separator)) if f.SharedStrings == nil { var sharedStrings xlsxSST ss := f.readXML("xl/sharedStrings.xml") -- cgit v1.2.1