fix(electrobun): PathBrowser uses unguarded files.browse RPC (dirs only)
- files.browse: new RPC handler — unguarded directory listing, returns only directories (no file content access). Used by PathBrowser wizard. - PathBrowser: uses files.browse instead of files.list (was blocked by guardPath "access denied: path outside allowed project directories") - Home dir resolved via files.homeDir RPC (not process.env.HOME) Note: GTK native dialog title/theme/sort controlled by Electrobun's native wrapper — canChooseFiles:false should set SELECT_FOLDER action but may need upstream fix for correct title.
This commit is contained in:
parent
46b4893d2d
commit
41d5cc3c12
3 changed files with 22 additions and 1 deletions
|
|
@ -146,6 +146,11 @@ export type PtyRPCRequests = {
|
|||
error?: string;
|
||||
};
|
||||
};
|
||||
/** Unguarded directory listing for PathBrowser (dirs only, no file content) */
|
||||
"files.browse": {
|
||||
params: { path: string };
|
||||
response: { entries: { name: string; type: 'dir'; size: number }[]; error?: string };
|
||||
};
|
||||
/** Native folder picker dialog */
|
||||
"files.pickDirectory": {
|
||||
params: { startingFolder?: string };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue