Skip to content

Commit

Permalink
Normalize the case before comparing compilation database paths (micro…
Browse files Browse the repository at this point in the history
…soft#4209)

Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
  • Loading branch information
2 people authored and hippo91 committed Dec 21, 2024
1 parent d63b8c6 commit d3123f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Bug Fixes:
- Ensure that tests are updated after a build. [#4148](https://github.com/microsoft/vscode-cmake-tools/pull/4148)
- Fix various GCC compiler errors and GCC linker errors not showing up in Problems View [#2864](https://github.com/microsoft/vscode-cmake-tools/issues/2864)
- Fix reloading presets when included files are changed or renamed and updated. [#3963](https://github.com/microsoft/vscode-cmake-tools/issues/3963)
- Fix compilation database path comparison with the `cmake.copyCompileCommands` that could otherwise overwrite that file. [#4207](https://github.com/microsoft/vscode-cmake-tools/issues/4207) [@k0zmo](https://github.com/k0zmo)
- Fix parsing of CMakeUserPresets.json containing configure preset that is referenced in workflow preset. [#4202](https://github.com/microsoft/vscode-cmake-tools/pull/4202)

## 1.19.52
Expand Down
4 changes: 2 additions & 2 deletions src/cmakeProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1541,13 +1541,13 @@ export class CMakeProject {
}
} else {
// single file with known path
const compdbPath = util.lightNormalizePath(path.join(await this.binaryDir, 'compile_commands.json'));
const compdbPath = util.platformNormalizePath(path.join(await this.binaryDir, 'compile_commands.json'));
if (await fs.exists(compdbPath)) {
compdbPaths.push(compdbPath);
if (this.workspaceContext.config.copyCompileCommands) {
// Now try to copy the compdb to the user-requested path
const copyDest = util.lightNormalizePath(this.workspaceContext.config.copyCompileCommands);
const expandedDest = util.lightNormalizePath(await expandString(copyDest, opts));
const expandedDest = util.platformNormalizePath(await expandString(copyDest, opts));
if (compdbPath !== expandedDest) {
const parentDir = path.dirname(expandedDest);
try {
Expand Down

0 comments on commit d3123f4

Please sign in to comment.