mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
make sure to await remote file reading in vscode.workspace.fs.readFile so that error handling is correct.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user