()
| 235 | } |
| 236 | |
| 237 | function persistBlessedPaths() |
| 238 | { |
| 239 | if (store == null) return; |
| 240 | |
| 241 | try |
| 242 | { |
| 243 | let arr = Array.from(blessedPaths); |
| 244 | |
| 245 | // Cap to keep the store bounded; newest insertions win. |
| 246 | if (arr.length > BLESSED_PATHS_MAX) |
| 247 | { |
| 248 | arr = arr.slice(arr.length - BLESSED_PATHS_MAX); |
| 249 | } |
| 250 | |
| 251 | store.set(BLESSED_PATHS_KEY, arr); |
| 252 | } |
| 253 | catch (e) {} |
| 254 | } |
| 255 | |
| 256 | function blessPath(p) |
| 257 | { |