diff --git a/direct.go b/direct.go index ce1d844..fa5ce2f 100644 --- a/direct.go +++ b/direct.go @@ -270,6 +270,15 @@ func (c *DirectConfig) Folders() []string { for _, p := range c.WatchFolders { add(p) } + // t149(2026-07-29 leo 實測揪出):**多帳號的看守資料夾在 Accounts[].WatchFolders**, + // 先前只讀頂層 ⇒ 只在 accounts[] 設定的用戶,Folders() 回 nil ⇒ 掃描清單空 ⇒ + // 按「立刻同步」毫無反應、log 顯示 "folders": null、results: [](leo 就是這樣卡住的)。 + // 頂層是舊制(單帳號);新制多帳號一律走 Accounts ⇒ 兩邊都要收。 + for _, a := range c.Accounts { + for _, p := range a.WatchFolders { + add(expandHome(p)) + } + } return out }