avoid reloading directories modified in the future

Related #453
This commit is contained in:
Gokcehan 2020-11-06 19:57:27 +03:00
parent f68406b93c
commit e8f115848f

10
nav.go
View File

@ -327,8 +327,16 @@ func (nav *nav) checkDir(dir *dir) {
switch {
case s.ModTime().After(dir.loadTime):
now := time.Now()
// XXX: Linux builtin exFAT drivers are able to predict modifications in the future
// https://bugs.launchpad.net/ubuntu/+source/ubuntu-meta/+bug/1872504
if s.ModTime().After(now) {
return
}
dir.loading = true
dir.loadTime = time.Now()
dir.loadTime = now
go func() {
nd := newDir(dir.path)
nd.sort()