make sure to await remote file reading in vscode.workspace.fs.readFile so that error handling is correct.

This commit is contained in:
Johannes Rieken
2021-11-23 09:45:52 +01:00
parent 4c9d116ddb
commit dc52700a60

View File

@@ -80,7 +80,8 @@ export class ExtHostConsumerFileSystem {
await that._proxy.$ensureActivation(uri.scheme);
return (await provider.readFile(uri)).slice(); // safe-copy
} else {
return that._proxy.$readFile(uri).then(buff => buff.buffer);
const buff = await that._proxy.$readFile(uri);
return buff.buffer;
}
} catch (err) {
return ExtHostConsumerFileSystem._handleError(err);