| 468 | // while this isn't needed as the backend does verification, this is a last resort to make sure |
| 469 | // script names and use ../ to escape the workspace folder |
| 470 | function checkValidName(wsFolder: vscode.Uri, name: string) { |
| 471 | const uri = vscode.Uri.joinPath(wsFolder, `/${name}.ts`); |
| 472 | const resolved = vscode.workspace.getWorkspaceFolder(uri); |
| 473 | if (resolved && resolved.uri.toString() === wsFolder.toString()) { |
| 474 | // this is inside the workspace folder |
| 475 | return true; |
| 476 | } |
| 477 | |
| 478 | return false; |
| 479 | } |
| 480 | |
| 481 | export interface BotloaderSourceControl extends vscode.SourceControl { |
| 482 | isBotloaderSourceControl: true, |