Commit 90365c4
Roo Code
fix: allow opening files without workspace root
The openFile function in open-file.ts was requiring a workspace root to be present,
which prevented opening global files (like MCP settings) when no workspace was open.
Modified the function to handle absolute paths without this requirement.
Previously, trying to open MCP settings in a new window without a workspace would
error with "Could not open file: No workspace root found". Now the function
properly handles both workspace-relative and absolute paths, allowing global
settings files to be accessed in any context.
Changes:
- Removed workspace root requirement in openFile
- Added fallback for relative paths when no workspace is present1 parent 9df50b4 commit 90365c4
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 32 | | |
36 | | - | |
37 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
0 commit comments