Skip to content

Commit

Permalink
Merge pull request #329 from yearnfar/master
Browse files Browse the repository at this point in the history
bugfix: RemoveAll
  • Loading branch information
mbertschler committed Mar 11, 2022
2 parents 931302a + 061c13d commit a2bf4c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion memmap.go
Expand Up @@ -279,7 +279,7 @@ func (m *MemMapFs) RemoveAll(path string) error {
defer m.mu.RUnlock()

for p := range m.getData() {
if strings.HasPrefix(p, path) {
if p == path || strings.HasPrefix(p, path+FilePathSeparator) {
m.mu.RUnlock()
m.mu.Lock()
delete(m.getData(), p)
Expand Down

0 comments on commit a2bf4c8

Please sign in to comment.