File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
vscode-extension/src/commands Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,17 @@ export function addAssemblyFromFilePath(
1313 decompiledTreeProvider : DecompiledTreeProvider ,
1414 decompiledTreeView : vscode . TreeView < MemberNode >
1515) {
16- let escaped : string = filePath . replace ( / \\ / g, "\\\\" ) ;
17- if ( escaped [ 0 ] === '"' && escaped [ escaped . length - 1 ] === '"' ) {
18- escaped = escaped . slice ( 1 , - 1 ) ;
16+ let assemblyFile = filePath ;
17+ if (
18+ assemblyFile [ 0 ] === '"' &&
19+ assemblyFile [ assemblyFile . length - 1 ] === '"'
20+ ) {
21+ assemblyFile = assemblyFile . slice ( 1 , - 1 ) ;
1922 }
2023
2124 try {
22- fs . accessSync ( escaped , fs . constants . R_OK ) ;
23- addAssemblyToTree ( escaped , decompiledTreeProvider , decompiledTreeView ) ;
25+ fs . accessSync ( assemblyFile , fs . constants . R_OK ) ;
26+ addAssemblyToTree ( assemblyFile , decompiledTreeProvider , decompiledTreeView ) ;
2427 } catch ( err ) {
2528 vscode . window . showErrorMessage ( "Cannot read the file " + filePath ) ;
2629 }
You can’t perform that action at this time.
0 commit comments