avoid reloading previews modified in the future

Related #453
This commit is contained in:
Gokcehan 2020-11-25 23:43:30 +03:00
parent 654a14ea7d
commit 5d204a1331

10
nav.go
View File

@ -527,8 +527,16 @@ func (nav *nav) checkReg(reg *reg) {
return
}
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
}
if s.ModTime().After(reg.loadTime) {
reg.loadTime = time.Now()
reg.loadTime = now
go nav.preview(reg.path)
}
}