Read file contents as stream in ChangeEncodingAction (#108052)

This commit is contained in:
Jean Pierre 2020-10-05 05:27:52 -05:00 committed by GitHub
parent fc5dd2f408
commit 625365b723
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1343,7 +1343,7 @@ export class ChangeEncodingAction extends Action {
let guessedEncoding: string | undefined = undefined;
if (this.fileService.canHandleResource(resource)) {
const content = await this.textFileService.read(resource, { autoGuessEncoding: true });
const content = await this.textFileService.readStream(resource, { autoGuessEncoding: true });
guessedEncoding = content.encoding;
}