Skip to content

Commit ce310af

Browse files
authored
Avoid relativizing paths in the project outline (#519)
In the project outline view, paths for the Makefile and build log were automatically made relative. If the setting was an absolute path, the result would be ugly: For a makeDirectory setting '/tmp/amhello-debug', the outline would print Makefile: [../../../tmp/amhello-debug/Makefile] This was not only unsightly, but also wrong. See https://unix.stackexchange.com/questions/13858/do-the-parent-directorys-permissions-matter-when-accessing-a-subdirectory In short, if one of the parent directories (..) would be inaccessible, the ../../../tmp/amhello-debug path is wrong because it's inaccessible, even though /tmp/amhello-debug is accessible.
1 parent 1635e95 commit ce310af

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Improvements:
1111
- Add support for post-configure and pre-configure script arguments, both globally and per configuration. [#151](https://github.com/microsoft/vscode-makefile-tools/issues/151)
1212
- Honor workspace trust in VS Code and warn about code being run during dry-run. [#514](https://github.com/microsoft/vscode-makefile-tools/pull/514)
1313
- Ship the parseCompilerArgs script with the extension to avoid race conditions. [#516](https://github.com/microsoft/vscode-makefile-tools/issues/516), [#475](https://github.com/microsoft/vscode-makefile-tools/issues/475)
14+
- Avoid relativizing paths in the project outline. [#519](https://github.com/microsoft/vscode-makefile-tools/pull/519) [@drok sponsored by @Mergesium](https://github.com/drok)
1415

1516
## 0.7.0
1617
Improvements:
@@ -130,4 +131,4 @@ Bug fixes:
130131
## 0.1
131132

132133
- Initial release
133-
- Support for IntelliSense, Build, Debug, Run configurations.
134+
- Support for IntelliSense, Build, Debug, Run configurations.

src/tree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,9 @@ export class ProjectOutlineProvider implements vscode.TreeDataProvider<BaseNode>
336336
this._currentConfigurationItem.update(configuration || this._unsetString);
337337
this._currentBuildTargetItem.update(buildTarget || this._unsetString);
338338
await this._currentLaunchTargetItem.update(launchTarget || this._unsetString);
339-
this._currentMakefilePathInfoItem.update(makefilePathInfo || this._unsetString, this.pathDisplayed(makefilePathInfo, "Makefile", false, true));
339+
this._currentMakefilePathInfoItem.update(makefilePathInfo || this._unsetString, this.pathDisplayed(makefilePathInfo, "Makefile", false, false));
340340
this._currentMakePathInfoItem.update(makePathInfo || this._unsetString, this.pathDisplayed(makePathInfo, "Make", true, false));
341-
this._currentBuildLogPathInfoItem.update(buildLogInfo || this._unsetString, this.pathDisplayed(buildLogInfo, "Build Log", false, true));
341+
this._currentBuildLogPathInfoItem.update(buildLogInfo || this._unsetString, this.pathDisplayed(buildLogInfo, "Build Log", false, false));
342342

343343
this.updateTree();
344344
}

0 commit comments

Comments
 (0)