(dir: string)
| 355 | } |
| 356 | |
| 357 | function legacyWorkspaceStorage(dir: string) { |
| 358 | const storage = workspaceStorage(pathKey(dir)) |
| 359 | const result = new Set<string>() |
| 360 | const raw = workspaceStorage(dir) |
| 361 | if (raw !== storage) result.add(raw) |
| 362 | |
| 363 | const key = pathKey(dir) |
| 364 | const drive = key.length >= 3 && key[1] === ":" && key[2] === "/" |
| 365 | if (drive) { |
| 366 | const backslash = workspaceStorage(key.replaceAll("/", "\\")) |
| 367 | if (backslash !== storage) result.add(backslash) |
| 368 | } |
| 369 | |
| 370 | if (result.size === 0) return |
| 371 | return [...result] |
| 372 | } |
| 373 | |
| 374 | function serverWorkspaceTarget(scope: ServerScopeValue, dir: string, key: string, legacy?: string[]): PersistTarget { |
| 375 | if (scope !== ServerScope.local) return { storage: workspaceStorage(ScopedKey.from(scope, pathKey(dir))), key } |
no test coverage detected