fix fs watcher of macOS

This commit is contained in:
josc146 2023-11-21 22:30:42 +08:00
parent 18d2ecb7a7
commit 3a449e7b46

View File

@ -69,8 +69,8 @@ func (a *App) OnBeforeClose(ctx context.Context) bool {
func (a *App) watchFs() { func (a *App) watchFs() {
watcher, err := fsnotify.NewWatcher() watcher, err := fsnotify.NewWatcher()
if err == nil { if err == nil {
watcher.Add("./lora-models") watcher.Add(a.exDir + "./lora-models")
watcher.Add("./models") watcher.Add(a.exDir + "./models")
go func() { go func() {
for { for {
select { select {