This commit is contained in:
Daniel 2023-08-15 16:18:43 +08:00
parent 0c0c6834c6
commit a169b3913a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 10 additions and 2 deletions

View file

@ -73,6 +73,11 @@ func watchAssets() {
lastEvent = event
timer.Reset(time.Millisecond * 100)
if lastEvent.Op&fsnotify.Rename == fsnotify.Rename {
// 索引资源文件内容
IndexAssetContent(lastEvent.Name)
}
case err, ok := <-assetsWatcher.Errors:
if !ok {
return