Commit 4afbc37
fix(ai): repair Windows fs sandbox path gate; run read-side fs ops off the GUI thread
The sandbox membership check compared Qt canonical paths (always '/') against
a prefix built with QDir::separator() ('\' on Windows), so every non-root path
was rejected as outside_sandbox: all writes failed and listing any named
subfolder failed, while root-anchored list/search worked because they bypass
the gate. Compare against '/' instead.
fs.list/fs.read/fs.search walked the workspace and opened files synchronously
on the Conversation's main thread, freezing the GUI on large or cloud-backed
(OneDrive) workspaces. Run those read-side ops on a worker thread while the
caller pumps a nested event loop, and guard the dropped-path list with a mutex
since it is now read off-thread.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e3ce6bf commit 4afbc37
4 files changed
Lines changed: 35 additions & 6 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
173 | | - | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
275 | 277 | | |
276 | 278 | | |
277 | 279 | | |
| 280 | + | |
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
| |||
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
| 294 | + | |
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
572 | 576 | | |
573 | 577 | | |
574 | 578 | | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
575 | 598 | | |
576 | 599 | | |
577 | 600 | | |
578 | 601 | | |
579 | 602 | | |
580 | 603 | | |
581 | 604 | | |
582 | | - | |
| 605 | + | |
583 | 606 | | |
584 | 607 | | |
585 | | - | |
| 608 | + | |
586 | 609 | | |
587 | 610 | | |
588 | | - | |
| 611 | + | |
589 | 612 | | |
590 | 613 | | |
591 | 614 | | |
| |||
0 commit comments