Set encoding to true (Bug fix for flavor) (#8395)

For offline scripts it shows the flavor as “Choose SQL Language”, this is because in flavorStatus.ts line 150 when we compare (uri === currentUri), the value of current Uri is "file:///d%3A/GitHub/PGExtension/TestDatabase/1ae730a9.sql" whereas the value for uri is "file:///d:/GitHub/PGExtension/TestDatabase/1ae730a9.sql" which ends up returning label ‘Choose SQL Language’.

In queryInput.ts we set public get uri(): string { return this.getResource().toString(true); }
This is the variable that we use in doChangeLanguageFlavor. And as we compare this with getEditorUri() later in flavorStatus.ts, it does not match. So enabling encoding here as well to get the encoded string in both the cases.
This commit is contained in:
swjain23
2019-11-20 12:36:20 -08:00
committed by Karl Burtram
parent f976fc9418
commit de4b7af1ad

View File

@@ -34,7 +34,7 @@ export function getEditorUri(input: IEditorInput): string {
}
if (uri) {
return uri.toString();
return uri.toString(true);
}
return undefined;
}