Bug Description:
When selecting a file or folder using vscode.window.showOpenDialog(), fragments and paths are handled differently in Theia compared to VS Code.
Theia adds the part after the hash (#) to the fragment property of the vscode.Uri object, while VS Code appends it to the path property instead.
Steps to Reproduce:
- Show a folder / file selector using
vscode.window.showOpenDialog and await user response.
- Select and open a folder / file path that includes a hash (#) (e.g. 'c:/example/#path').
- Inspect the received
vscode.Uri object properties.
Example:
const selectedUris = await vscode.window.showOpenDialog({ canSelectMany: false, canSelectFolders: true });
console.log(selectedUris?.[0]);
Additional Information
- Operating System: Windows 10 Enterprise
- Theia Version: 1.43.0
Theia vscode.Uri object path and fragment properties:
path: '/c:/example/'
fragment: 'path'
VS Code vscode.Uri object path and fragment properties:
path: '/C:/example/#path'
fragment: ''