Commit 3264ff7
fix(desktop): stop listing browsers that are not installed
Detection keyed off the browser's user-data directory, which is not evidence
the browser exists. Installers for native messaging hosts create an empty one
for every Chromium fork they know about, so a machine with only Chrome and
Helium listed Edge, Brave, Vivaldi, Opera and Arc as importable sources — each
holding nothing but a `NativeMessagingHosts` folder.
It now keys off the cookie database, which is the thing an import actually
needs. Existence is checked without opening the file, which matters for Safari:
TCC permits `stat` on the jar inside its container but refuses a read, so
Safari is still found and the user gets the Full Disk Access prompt instead of
Safari vanishing from the list.
A source that is not on the machine is now left out of the menu rather than
shown as a dead row. Every other unavailable reason stays visible, because each
names something the user can do — quit the browser, grant access.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent ea2efcb commit 3264ff7
4 files changed
Lines changed: 64 additions & 17 deletions
File tree
- apps
- desktop/src/preview/BrowserImport
- web/src/components/settings
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
62 | 72 | | |
63 | 73 | | |
64 | | - | |
| 74 | + | |
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
104 | 119 | | |
105 | 120 | | |
106 | 121 | | |
107 | 122 | | |
108 | 123 | | |
109 | | - | |
110 | 124 | | |
111 | 125 | | |
112 | 126 | | |
| |||
116 | 130 | | |
117 | 131 | | |
118 | 132 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 133 | + | |
124 | 134 | | |
125 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
126 | 151 | | |
127 | 152 | | |
128 | 153 | | |
129 | 154 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
134 | 160 | | |
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
598 | 606 | | |
599 | 607 | | |
600 | 608 | | |
| |||
678 | 686 | | |
679 | 687 | | |
680 | 688 | | |
681 | | - | |
| 689 | + | |
682 | 690 | | |
683 | 691 | | |
684 | | - | |
| 692 | + | |
685 | 693 | | |
686 | 694 | | |
687 | | - | |
688 | | - | |
689 | | - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
690 | 698 | | |
691 | 699 | | |
692 | 700 | | |
| |||
0 commit comments