Skip to content

Commit

Permalink
Fix crash when sorting files in a directory (#1204)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelim-work authored Apr 9, 2023
1 parent 734f11d commit 821b2fc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nav.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,11 @@ func (nav *nav) checkDir(dir *dir) {
dir.ignorecase != gOpts.ignorecase ||
dir.ignoredia != gOpts.ignoredia:
dir.loading = true
sd := *dir
go func() {
dir.sort()
dir.loading = false
nav.dirChan <- dir
sd.sort()
sd.loading = false
nav.dirChan <- &sd
}()
}
}
Expand Down

0 comments on commit 821b2fc

Please sign in to comment.