Skip to content

Commit

Permalink
trim the path before checking if it exists (#1924)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbrow committed May 3, 2018
1 parent 90d2813 commit b5b1cee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Extension/src/LanguageServer/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ export class CppProperties {
// Check for vcpkg instance and include relevent paths if found.
if (await util.checkFileExists(util.getVcpkgPathDescriptorFile())) {
let vcpkgRoot: string = await util.readFileText(util.getVcpkgPathDescriptorFile());
vcpkgRoot = vcpkgRoot.trim();
if (await util.checkDirectoryExists(vcpkgRoot)) {
let vcpkgInstalledPath: string = path.join(vcpkgRoot.trim(), "/installed");
let vcpkgInstalledPath: string = path.join(vcpkgRoot, "/installed");
let list: string[] = await util.readDir(vcpkgInstalledPath);
if (list !== undefined) {
// For every *directory* in the list (non-recursive). Each directory is basically a platform.
Expand Down

0 comments on commit b5b1cee

Please sign in to comment.