From a9385f2db948958137a1f5d6bb39282ce58c52e7 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Thu, 3 Dec 2015 22:28:21 -0500 Subject: [PATCH] Removing extra normalize call (since open already normalizes) --- memmap.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/memmap.go b/memmap.go index 6824ab5..4467136 100644 --- a/memmap.go +++ b/memmap.go @@ -37,6 +37,7 @@ func (m *MemMapFs) lock() { mx := m.getMutex() mx.Lock() } + func (m *MemMapFs) unlock() { m.getMutex().Unlock() } func (m *MemMapFs) rlock() { m.getMutex().RLock() } func (m *MemMapFs) runlock() { m.getMutex().RUnlock() } @@ -227,6 +228,7 @@ func (m *MemMapFs) Open(name string) (File, error) { m.rlock() f, ok := m.getData()[name] ff, ok := f.(*InMemoryFile) + if ok { ff.Open() } @@ -346,7 +348,6 @@ func (m *MemMapFs) Rename(oldname, newname string) error { } func (m *MemMapFs) Stat(name string) (os.FileInfo, error) { - name = normalizePath(name) f, err := m.Open(name) if err != nil { return nil, err